Source /etc/default/zfs after setting defaults.
authorDarik Horn <dajhorn@vanadac.com>
Sun, 4 Dec 2011 20:18:28 +0000 (14:18 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 5 Dec 2011 17:51:20 +0000 (09:51 -0800)
Let the administrator override all script variables by sourcing the
/etc/default/zfs file after the default values are set.

The spelling mistake in the old path name makes it unlikely that this
bug affected any users.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes: #371

etc/init.d/zfs.lsb.in

index c781f05..57aaf1e 100644 (file)
 # Source function library.
 . /lib/lsb/init-functions
 
-# Source zfs configuration.
-[ -f /etc/defaults/zfs ] &&  . /etc/defaults/zfs
-
-RETVAL=0
-
 LOCKFILE=/var/lock/zfs
 ZFS="@sbindir@/zfs"
 ZPOOL="@sbindir@/zpool"
 ZPOOL_CACHE="@sysconfdir@/zfs/zpool.cache"
 
+# Source zfs configuration.
+[ -r /etc/default/zfs ] &&  . /etc/default/zfs
+
 [ -x $ZPOOL ] || exit 1
 [ -x $ZFS ] || exit 2