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

@ -1,3 +1,4 @@
sysvinit (3.02) unreleased; urgency=low
* Added q and Q flags to synopsis in shutdown manual page. * Added q and Q flags to synopsis in shutdown manual page.
* Applied fixes for markup and spacing in manual pages. * Applied fixes for markup and spacing in manual pages.
Patch provided by Mario Blattermann. Patch provided by Mario Blattermann.
@ -5,6 +6,10 @@
* Added Makefile for man/ directory. Will handle translations * Added Makefile for man/ directory. Will handle translations
and substitutions. and substitutions.
* Applied new translations for multiple languages from Mario Blattermann. * Applied new translations for multiple languages from Mario Blattermann.
* 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.
sysvinit (3.01) released; urgency=low sysvinit (3.01) released; urgency=low

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH BOOTLOGD 8 "Jul 21, 2003" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH BOOTLOGD 8 "Jul 21, 2003" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
bootlogd \- record boot messages bootlogd \- record boot messages
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -17,7 +17,7 @@
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.\" .\"
.\" Author: Miloslav Trmac <mitr@redhat.com> .\" Author: Miloslav Trmac <mitr@redhat.com>
.TH FSTAB-DECODE 8 "May 2006" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH FSTAB-DECODE 8 "May 2006" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
fstab-decode \- run a command with fstab-encoded arguments fstab-decode \- run a command with fstab-encoded arguments

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH HALT 8 "Nov 6, 2001" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH HALT 8 "Nov 6, 2001" "sysvinit " "Linux System Administrator's Manual"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH INIT 8 "29 Jul 2004" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH INIT 8 "29 Jul 2004" "sysvinit " "Linux System Administrator's Manual"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME

View File

@ -14,7 +14,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH INITCTL 5 "April 13, 2018" "sysvinit @VERSION@" "File Formats" .TH INITCTL 5 "April 13, 2018" "sysvinit " "File Formats"
.SH NAME .SH NAME
initctl \- /run/initctl is a named pipe which passes commands to SysV init initctl \- /run/initctl is a named pipe which passes commands to SysV init
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH INITSCRIPT 5 "July 10, 2003" "sysvinit @VERSION@" "File Formats" .TH INITSCRIPT 5 "July 10, 2003" "sysvinit " "File Formats"
.SH NAME .SH NAME
initscript \- script that executes inittab commands initscript \- script that executes inittab commands
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH INITTAB 5 "Dec 4, 2001" "sysvinit @VERSION@" "File Formats" .TH INITTAB 5 "Dec 4, 2001" "sysvinit " "File Formats"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME
@ -67,6 +67,26 @@ a `+' character,
will not do utmp and wtmp accounting for that process. This is needed for will not do utmp and wtmp accounting for that process. This is needed for
gettys that insist on doing their own utmp/wtmp housekeeping. This is also gettys that insist on doing their own utmp/wtmp housekeeping. This is also
a historic bug. The length of this field is limited to 127 characters. a historic bug. The length of this field is limited to 127 characters.
Please note that including certain characters in the process field will result
in
.B init
attempting to launch a shell to interpret the command contained in the process field.
The characters which will trigger a shell are:
.B ~`!$^&*()=|\{}[];\"'<>?
On systems which do not have a shell to be launched or which do not wish to
use a shell to interpret the process field, the process field can be prefixed
with the @ symbol. The @ will be ignored and everything followed will be treated
as a command to be launched, literally, by the
.B init
service.
In cases where both a + and @ sign are to be used (to turn off logging and shell
interpretation), place the + sign before the @ symbol. Both flags will be handled
and then everything following the @ will be handled by
.B init
.\"}}} .\"}}}
.PP .PP
The \fIrunlevels\fP field may contain multiple characters for different The \fIrunlevels\fP field may contain multiple characters for different

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH KILLALL5 8 "04 Nov 2003" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH KILLALL5 8 "04 Nov 2003" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
killall5 - send a signal to all processes killall5 - send a signal to all processes
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH LAST, LASTB 1 "Jul 31, 2004" "sysvinit @VERSION@" "User Commands" .TH LAST, LASTB 1 "Jul 31, 2004" "sysvinit " "User Commands"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME

View File

@ -2,7 +2,7 @@
.\" Copyright 2003 by Theodore Ts'o. All Rights Reserved. .\" Copyright 2003 by Theodore Ts'o. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License. .\" This file may be copied under the terms of the GNU Public License.
.\" .\"
.TH LOGSAVE 8 "" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH LOGSAVE 8 "" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
logsave \- save the output of a command in a logfile logsave \- save the output of a command in a logfile
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH MESG 1 "Feb 26, 2001" "sysvinit @VERSION@" "User Commands" .TH MESG 1 "Feb 26, 2001" "sysvinit " "User Commands"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH MOUNTPOINT 1 "Mar 15, 2004" "sysvinit @VERSION@" "User Commands" .TH MOUNTPOINT 1 "Mar 15, 2004" "sysvinit " "User Commands"
.SH NAME .SH NAME
mountpoint \- see if a directory is a mountpoint mountpoint \- see if a directory is a mountpoint
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH PIDOF 8 "01 Sep 1998" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH PIDOF 8 "01 Sep 1998" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
pidof - find the process ID of a running program pidof - find the process ID of a running program
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH READBOOTLOG 1 "NOV 12, 2018" "sysvinit @VERSION@" "User Commands" .TH READBOOTLOG 1 "NOV 12, 2018" "sysvinit " "User Commands"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH RUNLEVEL 8 "May 27, 1997" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH RUNLEVEL 8 "May 27, 1997" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
runlevel - find the previous and current system runlevel runlevel - find the previous and current system runlevel
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -17,7 +17,7 @@
.\" .\"
.\"{{{}}} .\"{{{}}}
.\"{{{ Title .\"{{{ Title
.TH SHUTDOWN 8 "November 12, 2003" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH SHUTDOWN 8 "November 12, 2003" "sysvinit " "Linux System Administrator's Manual"
.\"}}} .\"}}}
.\"{{{ Name .\"{{{ Name
.SH NAME .SH NAME

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH SULOGIN 8 "17 Jan 2006" "sysvinit @VERSION@" "Linux System Administrator's Manual" .TH SULOGIN 8 "17 Jan 2006" "sysvinit " "Linux System Administrator's Manual"
.SH NAME .SH NAME
sulogin \- Single-user login sulogin \- Single-user login
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH UTMPDUMP 1 "Februar 8, 2010" "sysvinit @VERSION@" "User Commands" .TH UTMPDUMP 1 "Februar 8, 2010" "sysvinit " "User Commands"
.SH NAME .SH NAME
utmpdump \- dump UTMP and WTMP files in raw format utmpdump \- dump UTMP and WTMP files in raw format
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -15,7 +15,7 @@
.\" along with this program; if not, write to the Free Software .\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.\" .\"
.TH WALL 1 "15 April 2003" "sysvinit @VERSION@" "User Commands" .TH WALL 1 "15 April 2003" "sysvinit " "User Commands"
.SH NAME .SH NAME
wall - send a message to everybody's terminal wall - send a message to everybody's terminal

View File

@ -1097,10 +1097,12 @@ pid_t spawn(CHILD *ch, int *res)
break; break;
} }
} }
if (proc[0] == '@') proc++; /*skip leading backslash */
args[6] = proc; args[6] = proc;
args[7] = NULL; 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 */ /* 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 */ /* Give command line to shell */
args[1] = SHELL; args[1] = SHELL;
args[2] = "-c"; args[2] = "-c";
@ -1111,6 +1113,7 @@ pid_t spawn(CHILD *ch, int *res)
} else { } else {
/* Split up command line arguments */ /* Split up command line arguments */
buf[0] = 0; buf[0] = 0;
if (proc[0] == '@') proc++;
strncat(buf, proc, sizeof(buf) - 1); strncat(buf, proc, sizeof(buf) - 1);
ptr = buf; ptr = buf;
for(f = 1; f < 15; f++) { for(f = 1; f < 15; f++) {
@ -1312,7 +1315,7 @@ pid_t spawn(CHILD *ch, int *res)
if (pid == -1) { if (pid == -1) {
initlog(L_VB, "cannot fork, retry.."); initlog(L_VB, "cannot fork, retry..");
do_msleep(SHORT_SLEEP); do_msleep(SHORT_SLEEP);
continue; continue;
} }
return(pid); return(pid);