Update zfs.gentoo/zfs.lsb init script
* Update paths to zpool/zfs tools, * Log less for non-error conditions, * Don't be fatal if umount fails at shutdown -- final init remount will take care of it if /usr or / are in use Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
c8082367cf
commit
e93ced4847
|
@ -5,21 +5,19 @@
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
{
|
{
|
||||||
before net
|
# bootmisc will log to /var which may be a different zfs than root.
|
||||||
|
before net bootmisc
|
||||||
after udev localmount
|
after udev localmount
|
||||||
keyword -lxc -openvz -prefix -vserver
|
keyword -lxc -openvz -prefix -vserver
|
||||||
}
|
}
|
||||||
|
|
||||||
CACHEFILE=/etc/zfs/zpool.cache
|
CACHEFILE=/etc/zfs/zpool.cache
|
||||||
ZPOOL=/usr/sbin/zpool
|
ZPOOL=/sbin/zpool
|
||||||
ZFS=/usr/sbin/zfs
|
ZFS=/sbin/zfs
|
||||||
ZFS_MODULE=zfs
|
ZFS_MODULE=zfs
|
||||||
|
|
||||||
checksystem() {
|
checksystem() {
|
||||||
if [ -c /dev/zfs ]; then
|
if [ ! -c /dev/zfs ]; then
|
||||||
einfo "ZFS modules already loaded"
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
einfo "Checking if ZFS modules present"
|
einfo "Checking if ZFS modules present"
|
||||||
if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then
|
if [ "x$(modprobe -l $ZFS_MODULE | grep $ZFS_MODULE)" == "x" ]; then
|
||||||
eerror "$ZFS_MODULE not found. Is the ZFS package installed?"
|
eerror "$ZFS_MODULE not found. Is the ZFS package installed?"
|
||||||
|
@ -89,10 +87,12 @@ stop()
|
||||||
$ZFS umount -a
|
$ZFS umount -a
|
||||||
rv=$?
|
rv=$?
|
||||||
if [ $rv -ne 0 ]; then
|
if [ $rv -ne 0 ]; then
|
||||||
eerror "Failed to umount ZFS filesystems."
|
einfo "Some ZFS filesystems not unmounted"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eend $rv
|
# Don't fail if we couldn't umount everything. /usr might be in use.
|
||||||
|
eend 0
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
status()
|
status()
|
||||||
|
|
|
@ -32,8 +32,8 @@ RETVAL=0
|
||||||
|
|
||||||
LOCKFILE=/var/lock/zfs
|
LOCKFILE=/var/lock/zfs
|
||||||
CACHEFILE=/etc/zfs/zpool.cache
|
CACHEFILE=/etc/zfs/zpool.cache
|
||||||
ZPOOL=/usr/sbin/zpool
|
ZPOOL=/sbin/zpool
|
||||||
ZFS=/usr/sbin/zfs
|
ZFS=/sbin/zfs
|
||||||
|
|
||||||
[ -x $ZPOOL ] || exit 1
|
[ -x $ZPOOL ] || exit 1
|
||||||
[ -x $ZFS ] || exit 2
|
[ -x $ZFS ] || exit 2
|
||||||
|
|
Loading…
Reference in New Issue