aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorFlorian La Roche <laroche@redhat.com>2004-10-31 20:08:15 +0000
committerFlorian La Roche <laroche@redhat.com>2004-10-31 20:08:15 +0000
commitfd63008e5c0136b65283fe306bd00c835d057c24 (patch)
tree0785934d19cd6e9f945ce995e80f0f48147f9aa0 /sysconfig/network-scripts
parent0c16e93726765826fa3a359765d55c7c9933b9a2 (diff)
downloadinitscripts-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')
-rwxr-xr-xsysconfig/network-scripts/ifup-ppp2
-rw-r--r--sysconfig/network-scripts/network-functions7
2 files changed, 4 insertions, 5 deletions
diff --git a/sysconfig/network-scripts/ifup-ppp b/sysconfig/network-scripts/ifup-ppp
index 3d26ebe8..2e7e8184 100755
--- a/sysconfig/network-scripts/ifup-ppp
+++ b/sysconfig/network-scripts/ifup-ppp
@@ -11,7 +11,7 @@ if [ "${1}" = daemon ] ; then
shift
else
# just in case a full path to the configuration file is passed in
- CONFIG=$(basename $1)
+ CONFIG=${1##*/} # CONFIG=$(basename $1)
[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1}
source_config
# don't start ppp-watch by xDSL
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