mirror of
https://github.com/opnsense/src.git
synced 2026-03-05 06:40:31 -05:00
Make the netboot more tolerant about the config file.
This commit is contained in:
parent
66800f5742
commit
e8413d1db1
1 changed files with 9 additions and 4 deletions
|
|
@ -276,14 +276,19 @@ execute(buf)
|
|||
{
|
||||
char *p, *q;
|
||||
struct bootcmds_t *cmd = bootcmds;
|
||||
if ((!(*buf)) || (*buf == '#')) return(0);
|
||||
while (*buf == ' ' || *buf == '\t')
|
||||
buf++;
|
||||
if ((!(*buf)) || (*buf == '#'))
|
||||
return(0);
|
||||
while(cmd->name) {
|
||||
p = buf;
|
||||
q = cmd->name;
|
||||
while (*q && (*(q++) == *(p++))) ;
|
||||
if ((!(*q)) && ((*p == ' ') || (!(*p)))) {
|
||||
if (!cmd->func) return(1);
|
||||
while (*p == ' ') p++;
|
||||
if ((!(*q)) && ((*p == ' ') || (*p == '\t') || (!(*p)))) {
|
||||
if (!cmd->func)
|
||||
return(1);
|
||||
while (*p == ' ')
|
||||
p++;
|
||||
(cmd->func)(p);
|
||||
return(0);
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in a new issue