mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
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 <evansus@gmail.com> Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2196
This commit is contained in:
parent
449e75d768
commit
dc55d79101
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user