diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-12 22:49:24 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-12 22:49:24 +0100 |
commit | 91c22b1e65a950275656ea0b411888141450bcff (patch) | |
tree | 32e48500aed7c3d89310cd9e38e828c4db39f67a | |
parent | 5cb52946e51297ac2a4779a159f742e3619f4c6e (diff) |
mkfs fixes
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 6bfa823..364b41d 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -529,6 +529,11 @@ process_filesystem () fs_opts=${6:-no_opts} fs_label=${7:-no_label} fs_params=${8:-no_params} + [ "$fs_mountpoint" = no_mountpoint ] && fs_mountpoint= + [ "$fs_mount" = no_mount ] && fs_mount= + [ "$fs_opts" = no_opts ] && fs_opts= + [ "$fs_label" = no_label ] && fs_label= + [ "$fs_params" = no_params ] && fs_params= # Create the FS if [ "$fs_create" = yes ] @@ -538,7 +543,7 @@ process_filesystem () show_warning "process_filesystem error" "Cannot determine filesystem program for $fs_type on $part. Not creating this FS" return 1 fi - [ "$fs_label" = no_label ] && [ "$fs_type" = lvm-vg -o "$fs_type" = lvm-pv ] && fs_label=default #TODO. implement the incrementing numbers label for lvm vg's and lv's + [ -z "$fs_label" ] && [ "$fs_type" = lvm-vg -o "$fs_type" = lvm-pv ] && fs_label=default #TODO. implement the incrementing numbers label for lvm vg's and lv's ret=0 #TODO: health checks on $fs_params etc @@ -587,7 +592,7 @@ process_filesystem () # Add to temp fstab, if not already there. - if [ $fs_mountpoint != no_mountpoint -a $fs_mount = target ] + if [ -n "$fs_mountpoint" -a $fs_mount = target ] then local _uuid="$(getuuid $part)" if [ -n "${_uuid}" ]; then |