File: initscript.5

package info (click to toggle)
sysvinit 2.86.ds1-38
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 1,260 kB
  • ctags: 655
  • sloc: ansic: 7,385; sh: 4,399; makefile: 405; perl: 244
file content (55 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.TH INITSCRIPT 5 "July 10, 2003" "" "Linux System Administrator's Manual"
.SH NAME
initscript \- script that executes inittab commands.
.SH SYNOPSIS
/bin/sh /etc/initscript id runlevels action process
.SH DESCRIPTION
When the shell script \fI/etc/initscript\fP is present, \fBinit\fP
will use it to execute the commands from \fIinittab\fP.
This script can be used to set things like \fBulimit\fP and
\fBumask\fP default values for every process.
.SH EXAMPLES
This is a sample initscript, which might be installed on your
system as \fI/etc/initscript.sample\fP.
.RS
.sp
.nf
.ne 7

#
# initscript   Executed by init(8) for every program it
#              wants to spawn like this:
#
#              /bin/sh /etc/initscript <id> <level> <action> <process>
#

  # Set umask to safe level, and enable core dumps.
  umask 022
  ulimit -c 2097151
  PATH=/bin:/sbin:/usr/bin:/usr/sbin
  export PATH

  # Increase the hard filedescriptor limit for all processes
  # to 8192.  The soft limit is still 1024, but any unpriviliged
  # process can increase it's soft limit up to the hardlimit
  # with "ulimit -Sn xxx" (needs a 2.2.13 or later Linux kernel).
  ulimit -Hn 8192

  # Execute the program.
  eval exec "$4"

.sp
.RE
.SH NOTES
This script is not meant as startup script for daemons or somesuch.
It has nothing to do with a \fIrc.local\fP style script. It's just
a handler for things executed from \fB/etc/inittab\fP. Experimenting
with this can make your system un(re)bootable.
.RE
.SH FILES
/etc/inittab,
/etc/initscript.
.SH AUTHOR
Miquel van Smoorenburg ,<miquels@cistron.nl>
.SH "SEE ALSO"
init(8), inittab(5).