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/network-functions | |
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/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index d3cf86ef..d6deb549 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -9,9 +9,14 @@ export PATH need_config () { - [ -f "${CONFIG}" ] || CONFIG=../networking/default/${1} - [ -f "${CONFIG}" ] || CONFIG=../networking/default/ifcfg-${1} - [ -f "${CONFIG}" ] || CONFIG="ifcfg-${1}" + CURRENT_PROFILE=${CURRENT_PROFILE:-default} + CURRENT_PROFILE=${CURRENT_PROFILE##*/} + CONFIG=../networking/profiles/$CURRENT_PROFILE/ifcfg-${1} + [ -f "${CONFIG}" ] && return || CONFIG=../networking/profiles/$CURRENT_PROFILE/${1} + [ -f "${CONFIG}" ] && return || CONFIG=../networking/default/ifcfg-${1} + [ -f "${CONFIG}" ] && return || CONFIG=../networking/default/${1} + [ -f "${CONFIG}" ] && return || CONFIG="ifcfg-${1}" + [ -f "${CONFIG}" ] && return || CONFIG="${1}" } source_config () |