]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Remove uses of bash (and bash specific syntax) in runtime scripts
authorDaniel Molkentin <dmolkentin@suse.com>
Mon, 19 Oct 2020 14:23:51 +0000 (16:23 +0200)
committerDaniel Molkentin <daniel@molkentin.de>
Sat, 14 Nov 2020 15:36:38 +0000 (16:36 +0100)
dracutinstall picks up interpreters and includes bash despite
the users' wishes or expectations, as modules should not require
bashisms at runtime.

Fixes #951

modules.d/90multipath/multipath-shutdown.sh
modules.d/98dracut-systemd/dracut-cmdline-ask.sh

index f160f45ed1d7d174913114a7fd2993367224d05d..8f9ea99cd2f08cc6c31cee1c6d819a7a571b8917 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 for i in $(multipath -l -v1); do
     if ! dmsetup table $i | sed -n '/.*queue_if_no_path.*/q1' ; then
index f410f464eac47007f2d1d26a14843d9d44983bbf..fd64a68dce18e6f6a8dfdd29e486ec7d224b0dc6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
 
@@ -15,8 +15,8 @@ echo
 echo
 echo "Enter additional kernel command line parameter (end with ctrl-d or .)"
 while read -e -p "> " line || [ -n "$line" ]; do
-    [[ "$line" == "." ]] && break
-    [[ "$line" ]] && printf -- "%s\n" "$line" >> /etc/cmdline.d/99-cmdline-ask.conf
+    [ "$line" = "." ] && break
+    [ -n "$line" ] && printf -- "%s\n" "$line" >> /etc/cmdline.d/99-cmdline-ask.conf
 done
 
 exit 0