mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-30 02:34:14 +03:00
d/zfsutils.zfs.init derivatives: shellcheck, fix header
Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12042
This commit is contained in:
@@ -23,10 +23,8 @@
|
||||
#
|
||||
# Released under the 2-clause BSD license.
|
||||
#
|
||||
# The original script that acted as a template for this script came from
|
||||
# the Debian GNU/Linux kFreeBSD ZFS packages (which did not include a
|
||||
# licensing stansa) in the commit dated Mar 24, 2011:
|
||||
# https://github.com/zfsonlinux/pkg-zfs/commit/80a3ae582b59c0250d7912ba794dca9e669e605a
|
||||
# This script is based on debian/zfsutils.zfs.init from the
|
||||
# Debian GNU/kFreeBSD zfsutils 8.1-3 package, written by Aurelien Jarno.
|
||||
|
||||
# Source the common init script
|
||||
. @sysconfdir@/zfs/zfs-functions
|
||||
@@ -34,9 +32,8 @@
|
||||
# ----------------------------------------------------
|
||||
|
||||
chkroot() {
|
||||
while read line; do
|
||||
set -- $line
|
||||
if [ "$2" = "/" ]; then
|
||||
while read -r _ mp _; do
|
||||
if [ "$mp" = "/" ]; then
|
||||
return 0
|
||||
fi
|
||||
done < /proc/self/mounts
|
||||
@@ -65,7 +62,7 @@ do_depend()
|
||||
# Mount all datasets/filesystems
|
||||
do_mount()
|
||||
{
|
||||
local verbose overlay i mntpt val
|
||||
local verbose overlay i mntpt
|
||||
|
||||
check_boolean "$VERBOSE_MOUNT" && verbose=v
|
||||
check_boolean "$DO_OVERLAY_MOUNTS" && overlay=O
|
||||
@@ -83,7 +80,7 @@ do_mount()
|
||||
|
||||
read_mtab "^/dev/(zd|zvol)"
|
||||
read_fstab "^/dev/(zd|zvol)"
|
||||
i=0; var=$(eval echo FSTAB_$i)
|
||||
i=0; var=$(eval echo "FSTAB_$i")
|
||||
while [ -n "$(eval echo "$""$var")" ]
|
||||
do
|
||||
mntpt=$(eval echo "$""$var")
|
||||
|
||||
Reference in New Issue
Block a user