diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-13 12:35:00 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-13 12:35:00 +0100 |
commit | e6bd4c0a9391e1d473e0766a7401556ba2526b26 (patch) | |
tree | 37b4bf1adfc5a05aa04328cdf4258bc0c35803a1 /src/core/libs/lib-blockdevices-filesystems.sh | |
parent | 155874067181c16a3247c2bca8bffe25ae7605ae (diff) |
workaround missing VG device files
Diffstat (limited to 'src/core/libs/lib-blockdevices-filesystems.sh')
-rw-r--r-- | src/core/libs/lib-blockdevices-filesystems.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh index 3baada0..841a694 100644 --- a/src/core/libs/lib-blockdevices-filesystems.sh +++ b/src/core/libs/lib-blockdevices-filesystems.sh @@ -526,7 +526,7 @@ process_filesystems () process_filesystem () { - [ -z "$1" -o ! -b "$1" ] && die_error "process_filesystem needs a partition as \$1" + [ "$2" != lvm-lv ] && [ -z "$1" -o ! -b "$1" ] && die_error "process_filesystem needs a partition as \$1" # Don't do this for lv's. It's a hack to workaround non-existence of VG device files. [ -z "$2" ] && die_error "process_filesystem needs a filesystem type as \$2" debug "process_filesystem $@" part=$1 @@ -571,7 +571,7 @@ process_filesystem () lvm-vg) # $fs_params: ':'-separated list of PV's vgcreate $fs_opts $fs_label ${fs_params//:/ } >$LOG 2>&1; ret=$? ;; lvm-lv) # $fs_params = size string (eg '5G') - lvcreate -L $fs_params $fs_opts -n $fs_label $part >$LOG 2>&1; ret=$? ;; #$opts is usually something like -L 10G # TODO: do i need to active them? + lvcreate -L $fs_params $fs_opts -n $fs_label `sed 's#/dev/mapper/##' <<< $part` >$LOG 2>&1; ret=$? ;; #$opts is usually something like -L 10G # Strip '/dev/mapper/' part because device file may not exist. TODO: do i need to activate them? # don't handle anything else here, we will error later esac [ "$ret" -gt 0 ] && ( show_warning "process_filesystem error" "Error creating filesystem $fs_type on $part." ; return 1 ) |