committing changes in /etc made by "-bash"

Package changes:
This commit is contained in:
2022-02-16 14:17:54 +02:00
parent c256283f77
commit dabc477d52
165 changed files with 1531 additions and 904 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
}