#!/bin/sh

if [ -e /etc/dev.d/block/USBAutoMount.dev ]; then
	./rawthumb/rawthumb > ./rawthumb/rawthumb.log 2>&1
else
	if [ -d /etc/dev.d/block ]; then
		cp /mnt/hd/user/USBAutoMount.dev /etc/dev.d/block
	else
		mkdir /etc/dev.d/block 
		cp /mnt/hd/user/USBAutoMount.dev /etc/dev.d/block
	fi

	sync
	reboot
fi
