diff options
-rwxr-xr-x | scripts/add_bootfile_eth_hwid | 2 | ||||
-rwxr-xr-x | scripts/mod_bootfile_eth_hwid | 4 | ||||
-rwxr-xr-x | scripts/vyatta_net_name | 6 |
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 |