diff options
author | Bill Nottingham <notting@redhat.com> | 2003-02-11 02:34:18 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2003-02-11 02:34:18 +0000 |
commit | 9b662456bb416676232c35de2293509e31a33aca (patch) | |
tree | 5502d74b721e597c39fe3a23c070e9b9c970d473 /sysconfig/network-scripts/ifdown | |
parent | 65d8ed1235e0aa578ed271e9ec22ec36caeacf2c (diff) | |
download | initscripts-9b662456bb416676232c35de2293509e31a33aca.tar initscripts-9b662456bb416676232c35de2293509e31a33aca.tar.gz initscripts-9b662456bb416676232c35de2293509e31a33aca.tar.bz2 initscripts-9b662456bb416676232c35de2293509e31a33aca.tar.xz initscripts-9b662456bb416676232c35de2293509e31a33aca.zip |
fix nicknames with profiles (#82246)
- source 'network' file in ifdown, so we get the current profile
- change need_config to look in the various profile directories
- pass device to usernetctl, as that's what's linked where usernetctl looks
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index c16f251f..6f1be524 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -5,6 +5,9 @@ cd /etc/sysconfig/network-scripts . network-functions +[ -f ../network ] && . ../network +[ -f ../networking/network ] && . ../networking/network + CONFIG=$1 [ -z "$CONFIG" ] && { @@ -21,8 +24,9 @@ need_config $CONFIG if [ $UID != 0 ]; then if [ -x /usr/sbin/usernetctl ]; then - if /usr/sbin/usernetctl $CONFIG report ; then - exec /usr/sbin/usernetctl $CONFIG down + source_config + if /usr/sbin/usernetctl ${DEVICE} report ; then + exec /usr/sbin/usernetctl ${DEVICE} down fi fi echo $"Users cannot control this device." >&2 |