committing changes in /etc made by "-bash"

Package changes:
This commit is contained in:
2022-09-17 21:00:00 +03:00
parent 7be0be5adb
commit c23897d739
49 changed files with 15900 additions and 608 deletions

View File

@@ -2,6 +2,8 @@
#
# adds static routes which go through device $1
. /etc/sysconfig/network-scripts/network-functions
if [ -z "$1" ]; then
echo $"usage: ifup-routes <net-device> [<nickname>]"
exit 1
@@ -19,7 +21,12 @@ handle_file () {
line="$line via $(eval echo '$'GATEWAY$routenum)"
fi
line="$line dev $2"
/sbin/ip route add $line
/sbin/ip route add $line || {
net_log $"Failed to add route ${line}, using ip route replace instead." warning
/sbin/ip route replace $line
}
routenum=$(($routenum+1))
done
}
@@ -35,6 +42,11 @@ handle_ip_file() {
{ cat "$file" ; echo ; } | while read line; do
if [[ ! "$line" =~ $MATCH ]]; then
/sbin/ip $proto $type add $line
if [ $? != 0 ] && [ "$type" == "route" ] ; then
net_log $"Failed to add route ${line}, using ip route replace instead." warning
/sbin/ip $proto route replace $line
fi
fi
done
}