浏览代码

block-snapshot: fix ShellCheck warnings (3/3)

These were the remaining warnings that only affected the newer
block-snapshot in this git repo.
Rusty Bird 6 年之前
父节点
当前提交
8506547923
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      linux/system-config/block-snapshot

+ 3 - 3
linux/system-config/block-snapshot

@@ -99,7 +99,7 @@ create_dm_snapshot_origin() {
   fi
 }
 
-t=$(basename $0)
+t=$(basename "$0")
 t=${t#block-}
 
 case "$command" in
@@ -110,8 +110,8 @@ case "$command" in
         if [ "$p" == "MISSING" ]; then
           fatal "Missing device parameters ($t $XENBUS_PATH/params)"
         fi
-        echo $p > "$HOTPLUG_STORE-params"
-        echo $t > "$HOTPLUG_STORE-type"
+        echo "$p" > "$HOTPLUG_STORE-params"
+        echo "$t" > "$HOTPLUG_STORE-type"
         base=${p%%:*}
         cow=${p#*:}
         cow2=${p##*:}