450 |
|
char combuf[256]; |
451 |
|
register int i; |
452 |
|
register char *cp; |
453 |
+ |
char *pippt; |
454 |
|
/* create rad command */ |
455 |
|
sprintf(rendopt, " @%s/render.opt", vval(DIRECTORY)); |
456 |
|
sprintf(combuf, |
457 |
|
"rad -v 0 -s -e -w %s OPTFILE=%s | egrep '^[ \t]*(NOMATCH", |
458 |
|
rfargs, rendopt+2); |
459 |
|
cp = combuf; |
460 |
< |
while (*cp) cp++; /* match unset variables */ |
460 |
> |
while (*cp) { |
461 |
> |
if (*cp == '|') pippt = cp; |
462 |
> |
cp++; |
463 |
> |
} /* match unset variables */ |
464 |
|
for (i = 0; mvar[i] >= 0; i++) |
465 |
|
if (!vdef(mvar[i])) { |
466 |
|
*cp++ = '|'; |
467 |
|
strcpy(cp, vnam(mvar[i])); |
468 |
|
while (*cp) cp++; |
469 |
+ |
pippt = NULL; |
470 |
|
} |
471 |
< |
sprintf(cp, ")[ \t]*=' > %s/radset.var", vval(DIRECTORY)); |
472 |
< |
cp += 11; /* point to file name */ |
471 |
> |
if (pippt != NULL) |
472 |
> |
strcpy(pippt, "> /dev/null"); /* nothing to match */ |
473 |
> |
else { |
474 |
> |
sprintf(cp, ")[ \t]*=' > %s/radset.var", vval(DIRECTORY)); |
475 |
> |
cp += 11; /* point to file name */ |
476 |
> |
} |
477 |
|
if (system(combuf)) { |
478 |
|
fprintf(stderr, "%s: error executing rad command:\n\t%s\n", |
479 |
|
progname, combuf); |
480 |
|
quit(1); |
481 |
|
} |
482 |
< |
loadvars(cp); /* load variables and remove file */ |
483 |
< |
unlink(cp); |
482 |
> |
if (pippt == NULL) { /* load variables and remove file */ |
483 |
> |
loadvars(cp); |
484 |
> |
unlink(cp); |
485 |
> |
} |
486 |
|
} |
487 |
|
|
488 |
|
|