ifup, ifdown: do nothing unless NM_CONTROLLED=no is set in ifcfg file
This commit is contained in:
parent
b05691fb3b
commit
6177fa91d3
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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>
|
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
|
||||||
. /etc/sysconfig/rc
|
. /etc/sysconfig/rc
|
||||||
@ -9,6 +9,8 @@ DEVICE=${1}
|
|||||||
|
|
||||||
[ "${DEVICE}" ] || exit 1
|
[ "${DEVICE}" ] || exit 1
|
||||||
|
|
||||||
|
[ "$NM_CONTROLLED" = "0" ] || exit 0
|
||||||
|
|
||||||
[ -r $network_devices/ifcfg-${DEVICE} ] &&
|
[ -r $network_devices/ifcfg-${DEVICE} ] &&
|
||||||
. $network_devices/ifcfg-${DEVICE}
|
. $network_devices/ifcfg-${DEVICE}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/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>
|
# Copyright (c) 2003-2009 by Davide Madrisan <davide.madrisan@gmail.com>
|
||||||
|
|
||||||
. /etc/sysconfig/rc
|
. /etc/sysconfig/rc
|
||||||
@ -13,6 +13,8 @@ DEVICE=${1}
|
|||||||
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
|
[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
|
||||||
[ -r $network_devices/ifcfg-${DEVICE} ] && . $network_devices/ifcfg-${DEVICE}
|
[ -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" ] \
|
[ "$2" = "--udev" -a "$ONBOOT" != "yes" -a "$ONBOOT" != "1" -a "$ONBOOT" != "true" ] \
|
||||||
&& exit 0
|
&& exit 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user