Working with storage disk

Setting up specific configuration




Writting script

if [ ! -z $GETD_AT_MOUNT ]; then
    # action for mount, i.e. plug
else
    # action for umount i.e unplug
fi
TEXT=`getd-dialog -t question -m "entree un texte à la con..."`
CODE=$?

STR="you enter $TEXT and button was $CODE"
getd-dialog -t info -m "$STR"

Checking Disk
Use crypted devices
Use external Usb HDD

# mount external HDD with 2 vfat part 1 and 5

# performer AFTER ( auto ) mouting of the partition 1 by getd
at_mount()
{
    # partition a mount : 5 ( /dev/sdx5 ) on mount point /mnt/usb/sauve_b
    mount -t vfat -o noexec $GETD_MAIN_DEV"5" /mnt/usb/sauve_b
    CODE=$?
    if [ $CODE != 0 ] ; then
        getd-dialog -t error -m "Can't mount second usb storage" &
        exit 255
    fi

   # copy the previous code for more partition....
}

# performer BEFORE getd umount the partition 1
at_umount()
{
    umount /mnt/usb/sauve_b
    CODE=$?
    if [ $CODE != 0 ] ; then
        getd-dialog -t error -m "Can't Umount second usb storage" &
        exit 255
    fi

   # copy the previous code for more partition....
}

# what has to be done...
if [ ! -z $GETD_AT_MOUNT ]; then
    at_mount
else
    at_umount
fi
exit 0