echo "Failed to start lvmdbusd daemon"
return 1
fi
- echo $pid > LOCAL_LVMDBUSD
+ echo "$pid" > LOCAL_LVMDBUSD
echo ok
}
local IFS=$IFS_NL
local dm
- rm -rf "$TESTDIR/dev/$prefix"*
+ rm -rf "$TESTDIR/dev/$prefix*"
# Resume suspended devices first
for dm in $(dm_info suspended,name | grep "^Suspended:.*$prefix"); do
done
fi
test -n "$LOOP" # confirm or fail
- BACKING_DEV="$LOOP"
+ BACKING_DEV=$LOOP
echo "$LOOP" > LOOP
echo "$LOOP" > BACKING_DEV
echo "ok ($LOOP)"
local dev
for dev in "$@"; do
- dd if="$dev" of="$dev.backup" bs=1024
+ dd if="$dev" of="${dev}.backup" bs=1024
done
}
local dev
for dev in "$@"; do
- test -e "$dev.backup" || \
+ test -e "${dev}.backup" || \
die "Internal error: $dev not backed up, can't restore!"
- dd of="$dev" if="$dev.backup" bs=1024
+ dd of="$dev" if="${dev}.backup" bs=1024
done
}
profileconf() {
local pdir="$LVM_SYSTEM_DIR/profile"
- profile_name="$1"
+ local profile_name=$1
shift
generate_config "$@"
mkdir -p "$pdir"
test -f DEVICES && devs=$(< DEVICES)
-if test "$1" = dmsetup; then
+if test "$1" = "dmsetup" ; then
shift
dmsetup_wrapped "$@"
else