Update manual pages with markup and spacing fixes.

Added ability to use "@" symbol in command named in the inittab file. This
treats commands as literal and does not launch a shell to interpret them.

Updated inittab manual page to include overview of symbols which trigger
a shell interpretor and how to disable them using the @ symbol.
This commit is contained in:
Jesse
2022-02-15 17:01:41 -04:00
parent 3b233b0690
commit 644ee05aab
21 changed files with 49 additions and 21 deletions

View File

@ -1097,10 +1097,12 @@ pid_t spawn(CHILD *ch, int *res)
break;
}
}
if (proc[0] == '@') proc++; /*skip leading backslash */
args[6] = proc;
args[7] = NULL;
} else if (strpbrk(proc, "~`!$^&*()=|\\{}[];\"'<>?")) {
} else if ( (strpbrk(proc, "~`!$^&*()=|\\{}[];\"'<>?")) && (proc[0] != '@') ){
/* See if we need to fire off a shell for this command */
/* Do not launch shell if first character in proc string is an at symbol */
/* Give command line to shell */
args[1] = SHELL;
args[2] = "-c";
@ -1111,6 +1113,7 @@ pid_t spawn(CHILD *ch, int *res)
} else {
/* Split up command line arguments */
buf[0] = 0;
if (proc[0] == '@') proc++;
strncat(buf, proc, sizeof(buf) - 1);
ptr = buf;
for(f = 1; f < 15; f++) {
@ -1312,7 +1315,7 @@ pid_t spawn(CHILD *ch, int *res)
if (pid == -1) {
initlog(L_VB, "cannot fork, retry..");
do_msleep(SHORT_SLEEP);
do_msleep(SHORT_SLEEP);
continue;
}
return(pid);