aboutsummaryrefslogtreecommitdiffstats
path: root/src/usernetctl.c
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-02-06 06:38:30 +0000
committerErik Troan <ewt@redhat.com>1998-02-06 06:38:30 +0000
commitc1d1f2be41ab84ce25f1f0f4d518e112cf7fd7c4 (patch)
treee07f396309b3dca53b2bbd257053cb76a843192d /src/usernetctl.c
parentb1680e4e05f1e9e8b32e76ff7bcac7eb1d6c6bd9 (diff)
downloadinitscripts-c1d1f2be41ab84ce25f1f0f4d518e112cf7fd7c4.tar
initscripts-c1d1f2be41ab84ce25f1f0f4d518e112cf7fd7c4.tar.gz
initscripts-c1d1f2be41ab84ce25f1f0f4d518e112cf7fd7c4.tar.bz2
initscripts-c1d1f2be41ab84ce25f1f0f4d518e112cf7fd7c4.tar.xz
initscripts-c1d1f2be41ab84ce25f1f0f4d518e112cf7fd7c4.zip
didn't work for cloned devices
Diffstat (limited to 'src/usernetctl.c')
-rw-r--r--src/usernetctl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/usernetctl.c b/src/usernetctl.c
index 81401dae..bad10c96 100644
--- a/src/usernetctl.c
+++ b/src/usernetctl.c
@@ -107,6 +107,7 @@ int main(int argc, char ** argv) {
char * chptr;
char * cmd;
int report = 0;
+ char tmp;
if (argc != 3) usage();
@@ -154,10 +155,14 @@ int main(int argc, char ** argv) {
dash = strrchr(ifaceConfig, '-');
if (*(dash-1) != 'g') {
/* This was a clone configuration; ask the parent config */
+ tmp = *dash;
*dash = '\0';
- if (userCtl(ifaceConfig) == FOUND_TRUE)
+ if (userCtl(ifaceConfig) == FOUND_TRUE) {
/* exit the switch; users are allowed to control */
+ *dash = tmp;
break;
+ }
+ *dash = tmp;
}
/* else fall through */
case FOUND_FALSE: