mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
24 lines
519 B
Bash
24 lines
519 B
Bash
|
case "$root" in
|
||
|
zfs:FILESYSTEM=*|FILESYSTEM=*)
|
||
|
root="${root#zfs:}"
|
||
|
root="zfs:${root#FILESYSTEM=}"
|
||
|
rootfs="zfs"
|
||
|
rootok=1 ;;
|
||
|
zfs:ZFS=*|ZFS=*)
|
||
|
root="${root#zfs:}"
|
||
|
root="zfs:${root#ZFS=}"
|
||
|
rootfs="zfs"
|
||
|
rootok=1 ;;
|
||
|
esac
|
||
|
|
||
|
if [ "$rootok" != "1" ] ; then
|
||
|
zpool import -aN
|
||
|
zfsbootfs=`zpool list -H -o bootfs | grep -v ^-$ -m 1`
|
||
|
if [ -n "$zfsbootfs" ] ; then
|
||
|
root="zfs:$zfsbootfs"
|
||
|
rootfs="zfs"
|
||
|
rootok=1
|
||
|
fi
|
||
|
zpool list -H | while read fs rest ; do zpool export "$fs" ; done
|
||
|
fi
|