aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1998-07-01 16:20:09 +0000
committerErik Troan <ewt@redhat.com>1998-07-01 16:20:09 +0000
commit73426918dfb0d34cb118573cb8cac145ad4dcb5d (patch)
treeecadbdcff4bf4f5c4663bac41d9ab0b0f81ba076
parent558419e785d0e766357d46f9712dbef443b3e773 (diff)
downloadinitscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar.gz
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar.bz2
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.tar.xz
initscripts-73426918dfb0d34cb118573cb8cac145ad4dcb5d.zip
USERNET attribute can have "" around it
-rw-r--r--initscripts.spec5
-rw-r--r--src/usernetctl.c13
2 files changed, 16 insertions, 2 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 75c256ae..2285cd07 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -153,6 +153,11 @@ rm -rf $RPM_BUILD_ROOT
%doc sysconfig.txt
%changelog
+
+* Wed Jul 01 1998 Erik Troan <ewt@redhat.com>
+
+- usernetctl didn't understand "" around USERCTL attribute
+
* Wed Jul 1 1998 Jeff Johnson <jbj@redhat.com>
- Use /proc/version to find preferred modules.
- Numerous buglets fixed.
diff --git a/src/usernetctl.c b/src/usernetctl.c
index 0a8011eb..5a228bdc 100644
--- a/src/usernetctl.c
+++ b/src/usernetctl.c
@@ -91,8 +91,17 @@ int userCtl(char * file) {
*(++chptr) = '\0';
if (!strncmp(contents, "USERCTL=", 8)) {
- if (!strcmp(contents+8, "yes")) return FOUND_TRUE;
- else return FOUND_FALSE;
+ contents += 8;
+ if (contents[0] == '"' &&
+ contents[strlen(contents) - 1] == '"') {
+ contents++;
+ contents[strlen(contents) - 1] = '\0';
+ }
+
+ if (!strcmp(contents, "yes") || !strcmp(contents, "true"))
+ return FOUND_TRUE;
+ else
+ return FOUND_FALSE;
}
contents = end;