Sun Aug 31, 2014 5:57 pm
check_device () {
#check if is mounted
if [ "$device" = "" ]; then
exit_message="\n No device was selected"
exit_dialog
fi
MOUNTED=$(grep "${device}" /proc/mounts |awk '{print $1}')
echo "$MOUNTED"
if [[ -n "$MOUNTED" ]]; then
echo "$MOUNTED is mounted"
exit_message="\nDevice ${device}1 appears to be mounted."
exit_dialog
fi
# Check that first partition exists (blkid still shows result after zeroing device)
if ! $(/sbin/fdisk -l | grep -q "${device}1") ; then
echo "${device}1 does not exist."
exit_message="\nDevice ${device}1 does not exist.
Maybe you need to format it?"
exit_dialog
fi
#check if part1 is vfat
ISFAT=$(/sbin/blkid|grep "${device}1"|grep -i fat|grep -o "/dev/sd[a-z][0-9]")
echo $ISFAT
if [ "$ISFAT" = "" ]; then
exit_message="Cannot continue!\n\n${device}1 must be FAT formatted."
exit_dialog
fi
}
check_device () {
#check if is mounted
if [ "$device" = "" ]; then
exit_message="\n No device was selected"
exit_dialog
fi
MOUNTED=$(grep "${device}" /proc/mounts |awk '{print $1}')
echo "$MOUNTED"
if [[ -n "$MOUNTED" ]]; then
echo "$MOUNTED is mounted"
exit_message="\nDevice ${device}1 appears to be mounted."
exit_dialog
fi
# Check that first partition exists (blkid still shows result after zeroing device)
#if ! $(/sbin/fdisk -l | grep -q "${device}1") ; then
# echo "${device}1 does not exist."
# exit_message="\nDevice ${device}1 does not exist.
#Maybe you need to format it?"
# exit_dialog
#fi
#check if part1 is vfat
#ISFAT=$(/sbin/blkid|grep "${device}1"|grep -i fat|grep -o "/dev/sd[a-z][0-9]")
#echo $ISFAT
#if [ "$ISFAT" = "" ]; then
# exit_message="Cannot continue!\n\n${device}1 must be FAT formatted."
# exit_dialog
#fi
}
Sun Aug 31, 2014 9:56 pm
Mon Sep 01, 2014 9:07 pm
Wed Sep 03, 2014 5:44 pm
LIST OF USB DEVICES
/dev/sdb Kingston DataTraveler 2.0
/dev/sdb1
/dev/sdb1 is mounted
** (zenity:25150): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Wed Sep 03, 2014 10:55 pm
Thu Sep 04, 2014 11:45 am
refracta2usb -d
Thu Sep 04, 2014 8:16 pm
[email protected]:~$ refracta2usb -d
LIST OF USB DEVICES
/dev/sdb Generic Flash Disk
/dev/sdc Kingston DataTraveler 2.0
/dev/sdc1 does not exist.
[email protected]:~$ refracta2usb -d
LIST OF USB DEVICES
/dev/sdb Kingston DataTraveler 2.0
/dev/sdb1 does not exist.
Thu Sep 04, 2014 11:38 pm
Fri Sep 05, 2014 11:13 pm
[email protected]:~$ /sbin/blkid -c /dev/null
[email protected]:~$
Sat Sep 06, 2014 2:32 am