summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/systems.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-10-17 12:28:03 +0000
committerbrian <brian@FreeBSD.org>1998-10-17 12:28:03 +0000
commit6d25736c571cd9c9acd8e2b632b947a4dcdd6a09 (patch)
tree277796ee67c6786970442ce652ab135ebc7f4893 /usr.sbin/ppp/systems.c
parent7e1a7c6a69c3823f2a94156e335bb09052e58275 (diff)
downloadFreeBSD-src-6d25736c571cd9c9acd8e2b632b947a4dcdd6a09.zip
FreeBSD-src-6d25736c571cd9c9acd8e2b632b947a4dcdd6a09.tar.gz
Warn if we encounter an unindented line that isn't
terminated with a ``:''.
Diffstat (limited to 'usr.sbin/ppp/systems.c')
-rw-r--r--usr.sbin/ppp/systems.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index e5583f6..9962ed6 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: systems.c,v 1.37 1998/06/15 19:05:47 brian Exp $
+ * $Id: systems.c,v 1.38 1998/06/15 19:06:25 brian Exp $
*
* TODO:
*/
@@ -315,8 +315,13 @@ ReadSystem(struct bundle *bundle, const char *name, const char *file,
if (*cp == '\0') /* empty / comment */
continue;
- if (!indent) /* start of next section */
+ if (!indent) { /* start of next section */
+ wp = strchr(cp, ':');
+ if (doexec && (wp == NULL || wp[1] != '\0'))
+ log_Printf(LogWARN, "Unindented command (%s line %d) - ignored\n",
+ filename, linenum);
break;
+ }
len = strlen(cp);
argc = command_Interpret(cp, len, argv);
OpenPOWER on IntegriCloud