diff options
author | Florian La Roche <laroche@redhat.com> | 2004-10-31 20:08:15 +0000 |
---|---|---|
committer | Florian La Roche <laroche@redhat.com> | 2004-10-31 20:08:15 +0000 |
commit | fd63008e5c0136b65283fe306bd00c835d057c24 (patch) | |
tree | 0785934d19cd6e9f945ce995e80f0f48147f9aa0 /sysconfig/network-scripts/network-functions | |
parent | 0c16e93726765826fa3a359765d55c7c9933b9a2 (diff) | |
download | initscripts-fd63008e5c0136b65283fe306bd00c835d057c24.tar initscripts-fd63008e5c0136b65283fe306bd00c835d057c24.tar.gz initscripts-fd63008e5c0136b65283fe306bd00c835d057c24.tar.bz2 initscripts-fd63008e5c0136b65283fe306bd00c835d057c24.tar.xz initscripts-fd63008e5c0136b65283fe306bd00c835d057c24.zip |
- some optims/cleanups, details in initscripts.specr7-94
Diffstat (limited to 'sysconfig/network-scripts/network-functions')
-rw-r--r-- | sysconfig/network-scripts/network-functions | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index 249978a6..5b9429d2 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -32,11 +32,10 @@ need_config () source_config () { - DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'` - - if basename $CONFIG | grep -q '[^g]-' ; then + DEVNAME=${CONFIG##*/ifcfg-} #DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'` + if echo ${CONFIG##*/} | grep -q '[^g]-' ; then PARENTCONFIG=`echo $CONFIG | sed 's/-[^-]*$//g'` - PARENTDEVNAME=`basename $PARENTCONFIG | sed 's/^ifcfg-//g'` + PARENTDEVNAME=${PARENTCONFIG##*/ifcfg-} [ -f $PARENTCONFIG ] || { echo $"Missing config file $PARENTCONFIG." >&2 exit 1 |