committing changes in /etc made by "bash almalinux-deploy.sh -d"
Package changes:
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
#
|
||||
# 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
|
||||
@@ -21,12 +19,7 @@ handle_file () {
|
||||
line="$line via $(eval echo '$'GATEWAY$routenum)"
|
||||
fi
|
||||
line="$line dev $2"
|
||||
|
||||
/sbin/ip route add $line || {
|
||||
net_log $"Failed to add route ${line}, using ip route replace instead." warning
|
||||
/sbin/ip route replace $line
|
||||
}
|
||||
|
||||
/sbin/ip route add $line
|
||||
routenum=$(($routenum+1))
|
||||
done
|
||||
}
|
||||
@@ -42,11 +35,6 @@ 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user