ifup, ifdown: do nothing unless NM_CONTROLLED=no is set in ifcfg file

This commit is contained in:
Silvan Calarco 2012-03-13 14:53:02 +01:00
parent b05691fb3b
commit 6177fa91d3
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2003-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2003-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
. /etc/sysconfig/rc
@ -9,6 +9,8 @@ DEVICE=${1}
[ "${DEVICE}" ] || exit 1
[ "$NM_CONTROLLED" = "0" ] || exit 0
[ -r $network_devices/ifcfg-${DEVICE} ] &&
. $network_devices/ifcfg-${DEVICE}

View File

@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2003-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2003-2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
. /etc/sysconfig/rc
@ -13,6 +13,8 @@ DEVICE=${1}
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
[ -r $network_devices/ifcfg-${DEVICE} ] && . $network_devices/ifcfg-${DEVICE}
[ "$NM_CONTROLLED" = "no" ] || exit 0
[ "$2" = "--udev" -a "$ONBOOT" != "yes" -a "$ONBOOT" != "1" -a "$ONBOOT" != "true" ] \
&& exit 0