#
# A simple script to simply the loading/unloading the ZFS module stack.
-basedir="$(dirname $0)"
+basedir=$(dirname "$0")
SCRIPT_COMMON=common.sh
if [ -f "${basedir}/${SCRIPT_COMMON}" ]; then
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
fi
+# shellcheck disable=SC2034
PROG=zfs.sh
UNLOAD=
-h Show this message
-v Verbose
-u Unload modules
- -d Save debug log on unload
MODULE-OPTIONS:
Must be of the from module="options", for example:
EOF
}
-while getopts 'hvud' OPTION; do
+while getopts 'hvu' OPTION; do
case $OPTION in
h)
usage
exit 1
;;
v)
+ # shellcheck disable=SC2034
VERBOSE=1
;;
u)
UNLOAD=1
;;
- d)
- DUMP_LOG=1
- ;;
?)
usage
exit
esac
done
-if [ $(id -u) != 0 ]; then
+if [ "$(id -u)" != 0 ]; then
die "Must run as root"
fi