#!/bin/sh set >> /tmp/usb-storage-variables echo "---------------------------" >> /tmp/usb-storage-variables case "$ACTION" in add) #memorystick is plugged case "$PRODUCT" in c76/5/100) #udos stick /bin/mount -t auto -o auto,sync,uid=1001,gid=100,umask=027 /dev/sda1 /mnt/usbstick # /bin/mount -t auto -o auto,sync /dev/sda1 /mnt/usbstick ;; esac ;; remove) #memorystick is unplugged /bin/umount /dev/sda1 echo "should have been unmounted now" > /tmp/unmount.usbstick ;; *) echo "...dunno how to handle $0" >&2 exit 1 ;; esac