diff options
author | Colin Guthrie <colin@mageia.org> | 2011-10-21 01:28:48 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-10-21 10:10:39 +0100 |
commit | be75c98a06d569fbaa2d86f92676af961795d094 (patch) | |
tree | e2ce8ce7ffb97af34164634a3fbd8630dc7463e8 /sysconfig/network-scripts/ifup-post | |
parent | 4688ea25c9a5a87e48f89fc91a3c93a7c8c95b4a (diff) | |
download | initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.gz initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.bz2 initscripts-be75c98a06d569fbaa2d86f92676af961795d094.tar.xz initscripts-be75c98a06d569fbaa2d86f92676af961795d094.zip |
Add the mdkconf patch
Diffstat (limited to 'sysconfig/network-scripts/ifup-post')
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index 29af56b7..a751bf38 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -3,7 +3,7 @@ cd /etc/sysconfig/network-scripts . ./network-functions -[ -f ../network ] && . ../network +[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network unset REALDEVICE if [ "$1" = --realdevice ] ; then @@ -22,8 +22,12 @@ fi /etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME} +# metric setting (skip for alias interfaces) +if [ "${REALDEVICE}" = "${DEVICE}" ] && [ -n "$METRIC" ] && type -p ifmetric > /dev/null 2>&1; then + ifmetric ${DEVICE} $METRIC +fi -if [ "$PEERDNS" != "no" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then +if [ "$PEERDNS" != "no" -a "$BOOTPROTO" != "dhcp" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then [ -n "$MS_DNS1" ] && DNS1=$MS_DNS1 [ -n "$MS_DNS2" ] && DNS2=$MS_DNS2 if [ -n "$DNS1" ] && ! grep -q "^nameserver $DNS1" /etc/resolv.conf && @@ -96,6 +100,12 @@ fi # Notify programs that have requested notification do_netreport +mdv-network-event interface_up ${DEVICE} + +if [ -d /etc/sysconfig/network-scripts/ifup.d -a -x /usr/bin/run-parts ]; then + /usr/bin/run-parts --arg ${DEVICE} /etc/sysconfig/network-scripts/ifup.d +fi + if [ -x /sbin/ifup-local ]; then /sbin/ifup-local ${DEVICE} fi |