diff options
| author | Miloslav Trmac <mitr@volny.cz> | 2006-04-30 15:18:05 +0000 |
|---|---|---|
| committer | Miloslav Trmac <mitr@volny.cz> | 2006-04-30 15:18:05 +0000 |
| commit | a7bd801beb1d1d008d7fccf0d60e7f661117b0ca (patch) | |
| tree | bf9a427ce76fcf99347e4f83bae8f841101a4050 | |
| parent | c00242265b7908dce3824508a351886458886e89 (diff) | |
Fix comment and empty line handling in old-style route-* files (#114548)
| -rwxr-xr-x | sysconfig/network-scripts/ifup-routes | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup-routes b/sysconfig/network-scripts/ifup-routes index 61649a12..cc2b66db 100755 --- a/sysconfig/network-scripts/ifup-routes +++ b/sysconfig/network-scripts/ifup-routes @@ -33,11 +33,10 @@ for file in $FILES; do handle_file $file $1 else # older format - while read line; do - if [ "$line" == "${line##[[:space:]]*\#}" ]; then - /sbin/ip route add $line - fi - done < "$file" + sed '/^[[:space:]]*\(#.*\)\?$/d' < "$file" | \ + while read line; do + /sbin/ip route add $line + done fi fi done |
