diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-05 18:40:06 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-05 18:40:06 +0100 |
commit | 81f23c78763d8c21c82c146f3821988cd9b3a338 (patch) | |
tree | fd5cea97ec52bbab481a9310d3dab2824f041978 | |
parent | 6f431563d3ceee532e4866a59181053f0c59f71b (diff) |
cleanups and fixes
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 8cb0b79..c58e371 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -229,12 +229,13 @@ interactive_partition() { # create new, delete, or edit a filesystem interactive_filesystem () { + # these variables can be empty strings! part=$1 part_type=$2 part_label=$3 fs=$4 NEW_FILESYSTEM= - if [ $fs = empty ] + if [ -z "$fs" ] then fs_type= fs_mount= @@ -284,7 +285,7 @@ interactive_filesystem () # dm_crypt raw/rvm-lv no yes /dev/mapper/$label =dm device optional no - # Determine which filesystems/blockdevices are available + # Determine which filesystems/blockdevices are possible for this blockdevice FSOPTS= [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which mkfs.ext2 &>/dev/null && FSOPTS="$FSOPTS ext2 Ext2" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which mkfs.ext2 &>/dev/null && FSOPTS="$FSOPTS ext3 Ext3" @@ -292,10 +293,10 @@ interactive_filesystem () [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which mkfs.xfs &>/dev/null && FSOPTS="$FSOPTS xfs XFS" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which mkfs.jfs &>/dev/null && FSOPTS="$FSOPTS jfs JFS" [ $part_type = raw -o $part_type = lvm-lv -o $part_type = dm_crypt ] && which mkfs.vfat &>/dev/null && FSOPTS="$FSOPTS vfat VFAT" - [ $part_type = raw -o $part_type = dm_crypt ] && which pvcreate &>/dev/null && FSOPTS="$FSOPTS lvm-pv LVM Physical Volume" - [ $part_type = lvm-pv ] && which vgcreate &>/dev/null && FSOPTS="$FSOPTS lvm-vg LVM Volumegroup" - [ $part_type = lvm-vg ] && which lvcreate &>/dev/null && FSOPTS="$FSOPTS lvm-lv LVM Logical Volume" - [ $part_type = raw -o $part_type = lvm-lv ] && which cryptsetup &>/dev/null && FSOPTS="$FSOPTS dm_crypt DM_crypt Volume" + [ $part_type = raw -o $part_type = dm_crypt ] && which pvcreate &>/dev/null && FSOPTS="$FSOPTS lvm-pv LVM_Physical_Volume" + [ $part_type = lvm-pv ] && which vgcreate &>/dev/null && FSOPTS="$FSOPTS lvm-vg LVM_Volumegroup" + [ $part_type = lvm-vg ] && which lvcreate &>/dev/null && FSOPTS="$FSOPTS lvm-lv LVM_Logical_Volume" + [ $part_type = raw -o $part_type = lvm-lv ] && which cryptsetup &>/dev/null && FSOPTS="$FSOPTS dm_crypt DM_crypt_Volume" # ask FS default= |