diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:33:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-26 10:33:11 +0000 |
commit | 203af7302854f453fa4a05ecefd4403b6c8a4f8d (patch) | |
tree | 967fdacafe332baabd12b57725505c138d0f3bbf /modules.d/35network-legacy | |
parent | Adding upstream version 102. (diff) | |
download | dracut-87aa6639b3cd2285afa2ea598366934b1a158354.tar.xz dracut-87aa6639b3cd2285afa2ea598366934b1a158354.zip |
Adding upstream version 103.upstream/103upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules.d/35network-legacy')
-rwxr-xr-x | modules.d/35network-legacy/dhclient-script.sh | 4 | ||||
-rwxr-xr-x | modules.d/35network-legacy/ifup.sh | 8 | ||||
-rwxr-xr-x | modules.d/35network-legacy/module-setup.sh | 2 | ||||
-rwxr-xr-x | modules.d/35network-legacy/parse-bridge.sh | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh index b3e5e75..6cbc9c2 100755 --- a/modules.d/35network-legacy/dhclient-script.sh +++ b/modules.d/35network-legacy/dhclient-script.sh @@ -114,7 +114,7 @@ parse_option_121() { shift # Is the destination a multicast group? - if [ "$1" -ge 224 -a "$1" -lt 240 ]; then + if [ "$1" -ge 224 ] && [ "$1" -lt 240 ]; then multicast=1 else multicast=0 @@ -153,7 +153,7 @@ parse_option_121() { # Multicast routing on Linux # - If you set a next-hop address for a multicast group, this breaks with Cisco switches # - If you simply leave it link-local and attach it to an interface, it works fine. - if [ $multicast -eq 1 -o "$gateway" = "0.0.0.0" ]; then + if [ $multicast -eq 1 ] || [ "$gateway" = "0.0.0.0" ]; then temp_result="$destination dev $interface" else temp_result="$destination via $gateway dev $interface" diff --git a/modules.d/35network-legacy/ifup.sh b/modules.d/35network-legacy/ifup.sh index 3b54b6c..9827e2e 100755 --- a/modules.d/35network-legacy/ifup.sh +++ b/modules.d/35network-legacy/ifup.sh @@ -301,7 +301,7 @@ if [ -z "$NO_BOND_MASTER" ]; then key=${arg%%=*} value=${arg##*=} # %{value:0:1} is replaced with non-bash specific construct - if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then + if [ "${key}" = "arp_ip_target" ] && [ "${#value}" != "0" ] && [ "+${value%%+*}" != "+" ]; then OLDIFS=$IFS IFS=',' for arp_ip in $value; do @@ -421,7 +421,7 @@ fi # disable manual ifup while netroot is set for simplifying our logic # in netroot case we prefer netroot to bringup $netif automatically -[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" +[ -n "$2" ] && [ "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2" if [ -n "$manualup" ]; then : > "/tmp/net.$netif.manualup" @@ -536,12 +536,12 @@ if [ -z "$NO_AUTO_DHCP" ] && [ ! -e "/tmp/net.${netif}.up" ]; then # No ip lines, no bootdev -> default to dhcp ip=$(getarg ip) - if getargs 'ip=dhcp6' > /dev/null || [ -z "$ip" -a "$netroot" = "dhcp6" ]; then + if getargs 'ip=dhcp6' > /dev/null || [ -z "$ip" ] && [ "$netroot" = "dhcp6" ]; then load_ipv6 do_dhcp -6 ret=$? fi - if getargs 'ip=dhcp' > /dev/null || [ -z "$ip" -a "$netroot" != "dhcp6" ]; then + if getargs 'ip=dhcp' > /dev/null || [ -z "$ip" ] && [ "$netroot" != "dhcp6" ]; then do_dhcp -4 ret=$? fi diff --git a/modules.d/35network-legacy/module-setup.sh b/modules.d/35network-legacy/module-setup.sh index 42257eb..00e1f36 100755 --- a/modules.d/35network-legacy/module-setup.sh +++ b/modules.d/35network-legacy/module-setup.sh @@ -71,7 +71,7 @@ install() { ( # shellcheck disable=SC1090 . "$i" - if ! [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ] \ + if ! [ "${ONBOOT}" = "no" ] || [ "${ONBOOT}" = "NO" ] \ && [ -n "${TEAM_MASTER}${TEAM_CONFIG}${TEAM_PORT_CONFIG}" ]; then if [ -n "$TEAM_CONFIG" ] && [ -n "$DEVICE" ]; then mkdir -p "$initdir"/etc/teamd diff --git a/modules.d/35network-legacy/parse-bridge.sh b/modules.d/35network-legacy/parse-bridge.sh index caea1da..d331f9d 100755 --- a/modules.d/35network-legacy/parse-bridge.sh +++ b/modules.d/35network-legacy/parse-bridge.sh @@ -45,5 +45,5 @@ for bridge in $(getargs bridge=); do { echo "bridgename=$bridgename" echo "bridgeslaves=\"$bridgeslaves\"" - } > /tmp/bridge.${bridgename}.info + } > "/tmp/bridge.${bridgename}.info" done |