From 538156ddb86c1dc9ca269bab19de2f9e63b0ef34 Mon Sep 17 00:00:00 2001 From: hanzongcheng Date: Sat, 16 Oct 2021 15:42:55 +0800 Subject: [PATCH] fix-syntax-error-in-busybox-bash-environment --- ...ax-error-in-busybox-bash-environment.patch | 35 +++++++++++++++++++ initscripts.spec | 8 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 fix-syntax-error-in-busybox-bash-environment.patch diff --git a/fix-syntax-error-in-busybox-bash-environment.patch b/fix-syntax-error-in-busybox-bash-environment.patch new file mode 100644 index 0000000..714998b --- /dev/null +++ b/fix-syntax-error-in-busybox-bash-environment.patch @@ -0,0 +1,35 @@ +diff --git a/network-scripts/network-functions b/network-scripts/network-functions +index 42d01f3..216ddfd 100644 +--- a/network-scripts/network-functions ++++ b/network-scripts/network-functions +@@ -163,10 +163,10 @@ source_config () + ;; + esac + if [ -n "$HWADDR" ]; then +- HWADDR=$(tr '[a-z]' '[A-Z]' <<<"$HWADDR") ++ HWADDR=$(echo "$HWADDR" | tr '[a-z]' '[A-Z]') + fi + if [ -n "$MACADDR" ]; then +- MACADDR=$(tr '[a-z]' '[A-Z]' <<<"$MACADDR") ++ MACADDR=$(echo "$MACADDR" | tr '[a-z]' '[A-Z]') + fi + [ -z "$DEVICE" -a -n "$HWADDR" ] && DEVICE=$(get_device_by_hwaddr $HWADDR) + [ -z "$DEVICETYPE" ] && DEVICETYPE=$(echo ${DEVICE} | sed "s/[0-9]*$//") +@@ -564,7 +564,7 @@ install_bonding_driver () + + # add the bits to setup driver parameters here + # first set mode, miimon +- for (( idx=0; idx < ${#bopts_keys[*]}; idx++ )) ; do ++ for idx in `seq 0 $(( ${#bopts_keys[*]} - 1 ))` ; do + key=${bopts_keys[$idx]} + value=${bopts_vals[$idx]} + +@@ -583,7 +583,7 @@ install_bonding_driver () + done + + # set all other remaining options +- for (( idx=0; idx < ${#bopts_keys[*]}; idx++ )) ; do ++ for idx in `seq 0 $(( ${#bopts_keys[*]} - 1 ))` ; do + key=${bopts_keys[$idx]} + value=${bopts_vals[$idx]} + diff --git a/initscripts.spec b/initscripts.spec index d846fe2..ac537c9 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -20,7 +20,7 @@ Requires: gawk \ Name: initscripts Summary: Basic support for legacy System V init scripts Version: 10.06 -Release: 2 +Release: 3 License: GPLv2 @@ -358,6 +358,12 @@ fi # ============================================================================= %changelog +* Sat Oct 16 2021 hanzongcheng - 10.06-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix syntax error in busybox bash environment + * Mon Aug 02 2021 chenyanpanHW - 10.06-2 - DESC: delete -S git from %autosetup, and delete BuildRequires git -- Gitee