summaryrefslogtreecommitdiffstats
path: root/contrib/dracut
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-08-20 13:45:47 -0700
committerGitHub <[email protected]>2020-08-20 13:45:47 -0700
commit64025fa3a1f0f710f7f8678f2ac459b07ed9f88f (patch)
tree740ffc937bb1c9e4964054ad619f464cc060fe0c /contrib/dracut
parent7bba1d404cd213223cfca017035f9ebf8683a8ef (diff)
Silence 'make checkbashisms'
Commit d2bce6d03 added the 'make checkbashisms' target but did not resolve all of the bashisms in the scripts. This commit doesn't resolve them all either but it does fix up a few, and it excludes the others so 'make checkstyle' no longer prints warnings. It's a small step in the right direction. * Dracut is Linux specific and itself depends on bash. Therefore all dracut support scripts can be bash specific, update their shebang accordingly. * zed-functions.sh, zfs-import, zfs-mount, zfs-zed, smart paxcheck.sh, make_gitrev.sh - these scripts were excuded from the check until they can be updated and properly tested. * zfsunlock - only whole values for sleep are allowed. * vdev_id - removed unneeded locals; use && instead of -a. * dkms.mkconf, dkms.postbuil - use || instead of -o. Reviewed-by: InsanePrawn <[email protected]> Reviewed-by: Gabriel A. Devenyi <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #10755
Diffstat (limited to 'contrib/dracut')
-rwxr-xr-xcontrib/dracut/90zfs/export-zfs.sh.in2
-rwxr-xr-xcontrib/dracut/90zfs/mount-zfs.sh.in2
-rwxr-xr-xcontrib/dracut/90zfs/parse-zfs.sh.in2
-rwxr-xr-xcontrib/dracut/90zfs/zfs-lib.sh.in2
-rwxr-xr-xcontrib/dracut/90zfs/zfs-load-key.sh.in2
-rwxr-xr-xcontrib/dracut/90zfs/zfs-needshutdown.sh.in2
6 files changed, 6 insertions, 6 deletions
diff --git a/contrib/dracut/90zfs/export-zfs.sh.in b/contrib/dracut/90zfs/export-zfs.sh.in
index 892650383..09e4a3cc0 100755
--- a/contrib/dracut/90zfs/export-zfs.sh.in
+++ b/contrib/dracut/90zfs/export-zfs.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
. /lib/dracut-zfs-lib.sh
diff --git a/contrib/dracut/90zfs/mount-zfs.sh.in b/contrib/dracut/90zfs/mount-zfs.sh.in
index 73300a9b6..f5b3d9056 100755
--- a/contrib/dracut/90zfs/mount-zfs.sh.in
+++ b/contrib/dracut/90zfs/mount-zfs.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
. /lib/dracut-zfs-lib.sh
diff --git a/contrib/dracut/90zfs/parse-zfs.sh.in b/contrib/dracut/90zfs/parse-zfs.sh.in
index eccfdc6bc..6a805ae24 100755
--- a/contrib/dracut/90zfs/parse-zfs.sh.in
+++ b/contrib/dracut/90zfs/parse-zfs.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
. /lib/dracut-lib.sh
diff --git a/contrib/dracut/90zfs/zfs-lib.sh.in b/contrib/dracut/90zfs/zfs-lib.sh.in
index 44021c6e5..f470bfcc5 100755
--- a/contrib/dracut/90zfs/zfs-lib.sh.in
+++ b/contrib/dracut/90zfs/zfs-lib.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
command -v getarg >/dev/null || . /lib/dracut-lib.sh
command -v getargbool >/dev/null || {
diff --git a/contrib/dracut/90zfs/zfs-load-key.sh.in b/contrib/dracut/90zfs/zfs-load-key.sh.in
index 85e55c51b..ff586ef65 100755
--- a/contrib/dracut/90zfs/zfs-load-key.sh.in
+++ b/contrib/dracut/90zfs/zfs-load-key.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# only run this on systemd systems, we handle the decrypt in mount-zfs.sh in the mount hook otherwise
[ -e /bin/systemctl ] || return 0
diff --git a/contrib/dracut/90zfs/zfs-needshutdown.sh.in b/contrib/dracut/90zfs/zfs-needshutdown.sh.in
index e3d1b59cc..ddd3edae0 100755
--- a/contrib/dracut/90zfs/zfs-needshutdown.sh.in
+++ b/contrib/dracut/90zfs/zfs-needshutdown.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh