diff options
author | Miloslav Trmac <mitr@volny.cz> | 2006-07-27 02:17:03 +0000 |
---|---|---|
committer | Miloslav Trmac <mitr@volny.cz> | 2006-07-27 02:17:03 +0000 |
commit | 3db5ad738151d27001658d570bce0c61648fc2cc (patch) | |
tree | fcb9a69ac7f3896e0636f929fd87f13828c51852 /sysconfig/network-scripts/network-functions | |
parent | 02315ee166c1625d9524a783a1ad49383a4623db (diff) | |
download | initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar.gz initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar.bz2 initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.tar.xz initscripts-3db5ad738151d27001658d570bce0c61648fc2cc.zip |
Consistently exclude backup files when globbing
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 3a333147..ca2d802a 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -7,6 +7,8 @@ PATH="/sbin:/usr/sbin:/bin:/usr/bin" export PATH +[ -z "$__sed_discard_ignored_files" ] && . /etc/init.d/functions + get_hwaddr () { if [ -f /sys/class/net/${1}/address ]; then @@ -20,7 +22,8 @@ get_hwaddr () get_config_by_hwaddr () { - LANG=C grep -il "^[[:space:]]*HWADDR=${1}\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* + LANG=C grep -il "^[[:space:]]*HWADDR=${1}\([[:space:]#]\|$\)" /etc/sysconfig/network-scripts/ifcfg-* \ + | LC_ALL=C sed -e "$__sed_discard_ignored_files" } get_device_by_hwaddr () @@ -45,7 +48,8 @@ need_config () fi fi nconfig=$(LANG=C grep -l "^[[:space:]]*DEVICE=${1}\([[:space:]#]\|$\)" \ - /etc/sysconfig/network-scripts/ifcfg-*) + /etc/sysconfig/network-scripts/ifcfg-* \ + | LC_ALL=C sed -e "$__sed_discard_ignored_files") if [ -n "$nconfig" -a -f "$nconfig" ]; then CONFIG=${nconfig##*/} return |