Unquote ${ZPOOL_FORCE} variable usage.
authorFabio Erculiani <lxnay@sabayon.org>
Sun, 11 Nov 2012 09:13:03 +0000 (10:13 +0100)
committerRichard Yao <ryao@cs.stonybrook.edu>
Sun, 11 Nov 2012 17:01:28 +0000 (12:01 -0500)
The default value of ${ZPOOL_USAGE} is unset, quoting it would result into
a "" argument passed to zpool. The workaround to this is to use "dozfs=force"
boot argument.

Signed-off-by: Richard Yao <ryao@gentoo.org>
defaults/initrd.scripts

index 7cb41b3d6476cde5f69aefbac12880a0895b4628..2e8e744ce56351413792ee805a743f117b344984 100755 (executable)
@@ -707,7 +707,7 @@ startVolumes() {
                then
                        good_msg "Importing ZFS pools"
 
-                       /sbin/zpool import -N -a "${ZPOOL_FORCE}"
+                       /sbin/zpool import -N -a ${ZPOOL_FORCE}
 
                        if [ "$?" = '0' ]
                        then
@@ -725,12 +725,12 @@ startVolumes() {
                                then
                                        good_msg "LUKS detected. Reimporting ${ZFS_POOL}"
                                        /sbin/zpool export -f "${ZFS_POOL}"
-                                       /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}"
+                                       /sbin/zpool import -N ${ZPOOL_FORCE} "${ZFS_POOL}"
                                fi
                        else
                                good_msg "Importing ZFS pool ${ZFS_POOL}"
 
-                               /sbin/zpool import -N "${ZPOOL_FORCE}" "${ZFS_POOL}"
+                               /sbin/zpool import -N ${ZPOOL_FORCE} "${ZFS_POOL}"
 
                                if [ "$?" = '0' ]
                                then