summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-11 18:41:52 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-11 18:41:52 -0800
commit7082f5c70f29502de722dcbfe06d4a13e2954795 (patch)
treebcba0fd0a0fce984ca3c64c274e68e5b327e7768 /scripts
parentd4b5bf85f32965a0260ea907456bdc842c97ba51 (diff)
downloadvyatta-cfg-quagga-7082f5c70f29502de722dcbfe06d4a13e2954795.tar.gz
vyatta-cfg-quagga-7082f5c70f29502de722dcbfe06d4a13e2954795.zip
fix for bug 2547: don't require/output ':' after "hw-id".
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/add_bootfile_eth_hwid2
-rwxr-xr-xscripts/mod_bootfile_eth_hwid4
-rwxr-xr-xscripts/vyatta_net_name6
3 files changed, 6 insertions, 6 deletions
diff --git a/scripts/add_bootfile_eth_hwid b/scripts/add_bootfile_eth_hwid
index a315a103..61deea56 100755
--- a/scripts/add_bootfile_eth_hwid
+++ b/scripts/add_bootfile_eth_hwid
@@ -24,6 +24,6 @@ hwid=$3
sed -i '/^interfaces {$/,/^}$/ {
/^}$/i\
ethernet '"$eth"' {\
- hw-id: '"$hwid"'\
+ hw-id '"$hwid"'\
}
}' $bootfile
diff --git a/scripts/mod_bootfile_eth_hwid b/scripts/mod_bootfile_eth_hwid
index 51b2c022..feab64f1 100755
--- a/scripts/mod_bootfile_eth_hwid
+++ b/scripts/mod_bootfile_eth_hwid
@@ -25,8 +25,8 @@ sed -i '/^interfaces {$/,/^}$/ {
/^ ethernet '"$eth"' {$/ {
:join
/\n }$/ {
- /hw-id: / s/\(hw-id:\) [0-9a-fA-F:]\+/\1 '"$hwid"'/
- /hw-id: /! s/}$/ hw-id: '"$hwid"'\n }/
+ /hw-id:\? / s/\(hw-id\):\? [0-9a-fA-F:]\+/\1 '"$hwid"'/
+ /hw-id:\? /! s/}$/ hw-id '"$hwid"'\n }/
b
}
N
diff --git a/scripts/vyatta_net_name b/scripts/vyatta_net_name
index 9820d00f..61792340 100755
--- a/scripts/vyatta_net_name
+++ b/scripts/vyatta_net_name
@@ -71,7 +71,7 @@ shopt -s extglob nullglob
# ...
# ethernet eth# {
# ...
-# hw-id: XX:XX:XX:XX:XX:XX
+# hw-id XX:XX:XX:XX:XX:XX
# ...
# }
# }
@@ -86,9 +86,9 @@ declare -a cfg_net_hwid=( $( sed -ne '
# hold interface name
h
}
- /^.*hw-id:/ {
+ /^.*hw-id:\?/ {
# translate field name
- s/.*hw-id: *//
+ s/.*hw-id:\? *//
# tolower hex mac address
y/ABCDEF/abcdef/
# exchange hold and pattern space