dracut/0042-Clean-up-some-bashisms-from-bin-sh-scripts.patch
Harald Hoyer b386772815 dracut-044-75
- fix for systemd >= 230
- git snapshot
2016-06-07 10:24:44 +02:00

65 lines
2.6 KiB
Diff

From bcabe0fe2570d8cd39ab6af380bce44f13092450 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Mon, 28 Mar 2016 11:52:14 +0300
Subject: [PATCH] Clean up some bashisms from /bin/sh scripts
---
modules.d/40network/dhclient-script.sh | 2 +-
modules.d/40network/ifup.sh | 2 +-
modules.d/95fcoe/fcoe-edd.sh | 2 +-
modules.d/95nfs/nfs-lib.sh | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
index 13d2dc2..94ee9d1 100755
--- a/modules.d/40network/dhclient-script.sh
+++ b/modules.d/40network/dhclient-script.sh
@@ -95,7 +95,7 @@ setup_interface6() {
[ -n "$hostname" ] && echo "echo ${hostname%.$domain}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net.$netif.hostname
}
-function parse_option_121() {
+parse_option_121() {
while [ $# -ne 0 ]; do
mask="$1"
shift
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index 7c179bd..1185523 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -277,7 +277,7 @@ if [ -z "$NO_TEAM_MASTER" ]; then
for slave in $teamslaves ; do
ip link set $slave up 2>/dev/null
if wait_for_if_up $slave; then
- working_slaves+="$slave "
+ working_slaves="$working_slaves$slave "
fi
done
# Do not add slaves now
diff --git a/modules.d/95fcoe/fcoe-edd.sh b/modules.d/95fcoe/fcoe-edd.sh
index 3b07ad3..1e002d3 100755
--- a/modules.d/95fcoe/fcoe-edd.sh
+++ b/modules.d/95fcoe/fcoe-edd.sh
@@ -29,7 +29,7 @@ for disk in /sys/firmware/edd/int13_*; do
driver=${driver##*/}
fi
# i40e uses dev_port 1 for a virtual fcoe function
- if [ "${driver}" == "i40e" ]; then
+ if [ "${driver}" = "i40e" ]; then
dev_port=1
fi
for nic in "${disk}"/pci_dev/net/*; do
diff --git a/modules.d/95nfs/nfs-lib.sh b/modules.d/95nfs/nfs-lib.sh
index 58aa7e3..67608b1 100755
--- a/modules.d/95nfs/nfs-lib.sh
+++ b/modules.d/95nfs/nfs-lib.sh
@@ -110,7 +110,7 @@ nfsroot_from_dhcp() {
[ -f $f ] && . $f
done
[ -n "$new_root_path" ] && nfsroot_to_var "$nfs:$new_root_path"
- [ -z "$path" ] && [ "$(getarg root=)" == "/dev/nfs" ] && path=/tftpboot/%s
+ [ -z "$path" ] && [ "$(getarg root=)" = "/dev/nfs" ] && path=/tftpboot/%s
[ -z "$server" ] && server=$srv
[ -z "$server" ] && server=$new_dhcp_server_identifier
[ -z "$server" ] && server=$new_next_server