diff options
author | pst <pst@FreeBSD.org> | 1997-05-16 20:40:00 +0000 |
---|---|---|
committer | pst <pst@FreeBSD.org> | 1997-05-16 20:40:00 +0000 |
commit | 17bd88ae9b91eb1e6b440064d9bd4ee6c540e243 (patch) | |
tree | 7bfffa5ec3c48f06b9ff88267784fbfbf2ab54c5 /release | |
parent | 4b84d808203432df1d3e066d9eda79da496a37f2 (diff) | |
download | FreeBSD-src-17bd88ae9b91eb1e6b440064d9bd4ee6c540e243.zip FreeBSD-src-17bd88ae9b91eb1e6b440064d9bd4ee6c540e243.tar.gz |
Merge from 2.2: allow blank lines and comments
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/variable_load.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/release/sysinstall/variable_load.c b/release/sysinstall/variable_load.c index 93d9ee3..28257fd 100644 --- a/release/sysinstall/variable_load.c +++ b/release/sysinstall/variable_load.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated for what's essentially a complete rewrite. * - * $Id: variable_load.c,v 1.1.2.2 1997/04/01 02:04:58 pst Exp $ + * $Id: variable_load.c,v 1.3 1997/04/01 02:08:07 pst Exp $ * * Copyright (c) 1997 * Paul Traina. All rights reserved. @@ -84,6 +84,10 @@ variableLoad(dialogMenuItem * self) msgNotify("Loading %s pre-configuration file", cp); while (fgets(buf, sizeof buf, fp)) { + if ((cp = strchr(buf, '\n')) != NULL) + *cp = '\0'; + if (*buf == '\0' || *buf == '#') + continue; if (DITEM_STATUS(dispatchCommand(buf)) != DITEM_SUCCESS) { msgConfirm("Command `%s' failed - rest of script aborted.\n", buf); what |= DITEM_FAILURE; |