kadischi/desktop userhome.sh,1.3,1.4

Jasper O'neal Hartline (autopsy) fedora-extras-commits at redhat.com
Fri May 4 10:50:41 UTC 2007


Author: autopsy

Update of /cvs/devel/kadischi/desktop
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12071/kadischi/desktop

Modified Files:
	userhome.sh 
Log Message:
Minor fixes


Index: userhome.sh
===================================================================
RCS file: /cvs/devel/kadischi/desktop/userhome.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- userhome.sh	12 Apr 2007 06:32:20 -0000	1.3
+++ userhome.sh	4 May 2007 10:50:39 -0000	1.4
@@ -27,6 +27,7 @@
 select_device () {
         device="$device $(zenity --list --title "$TITLE" --radiolist  --text "Select the device containing our mountable partition for /home" \
      --column "" --column "Device" --column "Description"  --separator " "       \
+        "" "/dev/fd0" "First floppy device"   \
         "" "/dev/hda" "First IDE disk"        \
         "" "/dev/hdb" "Second IDE disk"       \
         "" "/dev/hdc" "Third IDE disk"        \
@@ -40,14 +41,18 @@
 }
 
 select_partitions () {
-        partition="$partition $(zenity --list --title "$TITLE" --radiolist  --text "Select the partition that will be mounted under /home" \
-     --column "" --column "Partition" --column "Description"  --separator " "          \
-        "" "/dev/$1d$21" "First partition"    \
-        "" "/dev/$1d$22" "Second partition"   \
-        "" "/dev/$1d$23" "Third partition"    \
-        "" "/dev/$1d$24" "Fourth partition"   \
-        --height=300 --width=300)"
-        [ "$(echo $?)" != "0" ] && exit 1
+    if [ "$device" -eq "/dev/fd0" ]; then
+        partition="/dev/fd0"
+    else
+            partition="$partition $(zenity --list --title "$TITLE" --radiolist  --text "Select the partition that will be mounted under /home" \
+         --column "" --column "Partition" --column "Description"  --separator " "          \
+            "" "/dev/$1d$21" "First partition"    \
+            "" "/dev/$1d$22" "Second partition"   \
+            "" "/dev/$1d$23" "Third partition"    \
+            "" "/dev/$1d$24" "Fourth partition"   \
+            --height=300 --width=300)"
+            [ "$(echo $?)" != "0" ] && exit 1
+    fi
 }
 
 do_mount() {
@@ -72,6 +77,9 @@
         introduction
         select_device
         case $device in
+           ' /dev/fd0')
+                      select_partitions f 0
+                        ;;
            ' /dev/hda')
                       select_partitions h a
                         ;;
@@ -156,11 +164,20 @@
                 if [ "$?" -eq "0" ]; then
                 ### Begin user disk and partition selections
                     dialog --backtitle "Kadischi User Data" --title "Kadischi user disk selection" --begin 6 9 --aspect 0 --shadow --menu "Please choose the
-disk that contains our mountable partition" 20 60 8 /dev/hda "First IDE disk" /dev/hdb "Second IDE disk" /dev/hdc "Third IDE disk" /dev/hdd "Fourth IDE disk" /dev/sda "First SCSI disk" /dev/sdb "Second SCSI disk" /dev/sdc "Third SCSI disk" /dev/sdd "Fourth SCSI disk" 2>/tmp/.disk
+disk that contains our mountable partition" 20 60 8 /dev/fd0 "First floppy device" /dev/hda "First IDE disk" /dev/hdb "Second IDE disk" /dev/hdc "Third IDE disk" /dev/hdd "Fourth IDE disk" /dev/sda "First SCSI disk" /dev/sdb "Second SCSI disk" /dev/sdc "Third SCSI disk" /dev/sdd "Fourth SCSI disk" 2>/tmp/.disk
 
                     if [ -f /tmp/.disk ]; then
                         DISK=$(cat /tmp/.disk)
-                        if [ "$DISK" == "/dev/hda" ]; then
+                        if [ "$DISK" == "/dev/fd0" ]; then
+                            get_fstype
+                            do_mount
+                            do_cleanup
+                        else
+                            do_cleanup
+                            exit 1
+                        fi
+
+                        elif [ "$DISK" == "/dev/hda" ]; then
                            dialog --backtitle "Kadischi User Data" --title "Kadischi user partition selection" --begin 6 9 --aspect 0 --shadow --menu "Please choose the partition on $DISK to be mounted under /home" 20 60 4 /dev/hda1 "First partition" /dev/hda2 "Second partition" /dev/hda3 "Third partition" /dev/hda4 "Fourth partition" 2>/tmp/.disk.partition
                             if [ "$?" -eq "0" ]; then
                                 get_fstype
@@ -288,12 +305,16 @@
                                            ;;
 
                                     2) echo "Please provide the partition number of which is our mountable partition"
-                                       echo -n "[1]: "
-                                           read PARTITION
-                                           if [ ! "$PARTITION" ]; then
-                                               PARTITION=1
-                                           fi
-                                           ;;
+                                       if [ "$DISK" -eq "/dev/fd0" ]; then
+                                           PARTITION="/dev/fd0"
+                                       else
+                                           echo -n "[1]: "
+                                               read PARTITION
+                                               if [ ! "$PARTITION" ]; then
+                                                   PARTITION=1
+                                               fi
+                                               ;;
+                                       fi
 
                                     3) echo "Please provide the filesystem type of which our mountable partition is"
                                        echo -n "[ext2]: "




More information about the fedora-extras-commits mailing list