aboutsummaryrefslogtreecommitdiffstats
path: root/dracut
diff options
context:
space:
mode:
authorEvan Susarret <[email protected]>2014-03-20 16:21:34 -0400
committerBrian Behlendorf <[email protected]>2014-08-13 16:53:06 -0700
commitdc55d791011b31317ad57ecb36be0a27b7647ef2 (patch)
tree71439fbe91bd985201ac783ae1da7b0437f9824a /dracut
parent449e75d76816a0074fef8f8962f5f91a51dd007e (diff)
Correct autodetection of bootfs property
Remove lines that contain only a hyphen (match '^-$' instead of '-'). I had a root fs with a hyphen in the name (fedora/ROOT/Fedora20-Dev), it was not detected because sed eliminated that line of output from 'zpool list -Ho bootfs'. Signed-off-by: Evan Susarret <[email protected]> Signed-off-by: Turbo Fredriksson <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2196
Diffstat (limited to 'dracut')
-rwxr-xr-xdracut/90zfs/mount-zfs.sh.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/dracut/90zfs/mount-zfs.sh.in b/dracut/90zfs/mount-zfs.sh.in
index 2d2afd879..23ec7e45b 100755
--- a/dracut/90zfs/mount-zfs.sh.in
+++ b/dracut/90zfs/mount-zfs.sh.in
@@ -18,13 +18,13 @@ case "$root" in
# Might be imported by the kernel module, so try searching before
# we import anything.
- zfsbootfs=`zpool list -H -o bootfs | sed -n '/-/ !p' | sed 'q'`
+ zfsbootfs=`zpool list -H -o bootfs | sed -n '/^-$/ !p' | sed 'q'`
if [ "$?" != "0" ] || [ "$zfsbootfs" = "" ] || \
[ "$zfsbootfs" = "no pools available" ] ; then
# Not there, so we need to import everything.
info "ZFS: Attempting to import additional pools."
zpool import -N -a ${ZPOOL_FORCE}
- zfsbootfs=`zpool list -H -o bootfs | sed -n '/-/ !p' | sed 'q'`
+ zfsbootfs=`zpool list -H -o bootfs | sed -n '/^-$/ !p' | sed 'q'`
if [ "$?" != "0" ] || [ "$zfsbootfs" = "" ] || \
[ "$zfsbootfs" = "no pools available" ] ; then
rootok=0