diff options
-rw-r--r-- | doc/benefits.html | 2 | ||||
-rw-r--r-- | doc/faq.html | 8 | ||||
-rw-r--r-- | doc/replaceinit.html | 8 | ||||
-rw-r--r-- | doc/runlevels.html | 14 | ||||
-rw-r--r-- | doc/runscripts.html | 2 | ||||
-rw-r--r-- | doc/runsv.8.html | 4 | ||||
-rw-r--r-- | doc/runsvchdir.8.html | 4 | ||||
-rw-r--r-- | doc/sv.8.html | 4 | ||||
-rw-r--r-- | doc/useinit.html | 4 | ||||
-rw-r--r-- | doc/utmpset.8.html | 2 | ||||
-rwxr-xr-x | etc/2 | 2 | ||||
-rwxr-xr-x | etc/debian/3 | 4 | ||||
-rwxr-xr-x | etc/freebsd/3 | 4 | ||||
-rwxr-xr-x | etc/macosx/StartupItems/runit | 4 | ||||
-rw-r--r-- | etc/macosx/org.smarden.runit.plist | 2 | ||||
-rwxr-xr-x | etc/openbsd/3 | 4 | ||||
-rw-r--r-- | man/runsv.8 | 4 | ||||
-rw-r--r-- | man/runsvchdir.8 | 4 | ||||
-rw-r--r-- | man/sv.8 | 4 | ||||
-rw-r--r-- | man/utmpset.8 | 2 | ||||
-rw-r--r-- | package/CHANGES | 1 | ||||
-rw-r--r-- | src/sv.c | 2 |
22 files changed, 45 insertions, 44 deletions
diff --git a/doc/benefits.html b/doc/benefits.html index 57f0d94..193e734 100644 --- a/doc/benefits.html +++ b/doc/benefits.html @@ -149,7 +149,7 @@ sysvinit</a>. Stage 2 is packaging friendly: all a software package that provides a service needs to do is to include a <i>service directory</i> in the package, and to provide a symbolic link -to this directory in <tt>/var/service/</tt>. +to this directory in <tt>/service/</tt>. The service will be started within five seconds, and automatically at boot time. The package's install and update scripts can use the reliable control diff --git a/doc/faq.html b/doc/faq.html index 7fdf734..a2eae27 100644 --- a/doc/faq.html +++ b/doc/faq.html @@ -216,12 +216,12 @@ How do I tell runit about the new service directory, so that it picks up and runs the service by default? <p> Answer: -Create a symbolic link in <tt>/var/service/</tt> pointing to the service +Create a symbolic link in <tt>/service/</tt> pointing to the service directory, runit will pick up the service within the next five seconds, and automatically start it on system boot. E.g.: <pre> - # ln -s /etc/sv/getty-2 /var/service/ + # ln -s /etc/sv/getty-2 /service/ </pre> <hr> @@ -283,13 +283,13 @@ supervision. How do I tell runit? <p> Answer: -Remove the symbolic link in <tt>/var/service/</tt> pointing to the service +Remove the symbolic link in <tt>/service/</tt> pointing to the service directory, runit recognizes the removed service within the next five seconds, then stops the service, the optional log service, and finally the supervisor process. E.g.: <pre> - # rm /var/service/getty-2 + # rm /service/getty-2 </pre> <hr> diff --git a/doc/replaceinit.html b/doc/replaceinit.html index b154dd3..010d064 100644 --- a/doc/replaceinit.html +++ b/doc/replaceinit.html @@ -52,8 +52,8 @@ running any getty (edit <tt>/etc/inittab</tt> and <tt>kill -HUP 1</tt> if needed), and tell <a href="runsvdir.8.html">runsvdir</a> about the getty-5 <i>service</i>: <pre> - # mkdir -p /var/service - # ln -s /etc/sv/getty-5 /var/service/ + # mkdir -p /service + # ln -s /etc/sv/getty-5 /service/ </pre> Start <i>runit</i>'s stage 2 for testing: <pre> @@ -177,8 +177,8 @@ FreeBSD 4.4: and tell <a href="runsvdir.8.html">runsvdir</a> about the <tt>getty-5</tt> <i>service</i>: <pre> - # mkdir -p /var/service - # ln -s /etc/sv/getty-5 /var/service/ + # mkdir -p /service + # ln -s /etc/sv/getty-5 /service/ </pre> Start <i>runit</i>'s stage 2 for testing: <pre> diff --git a/doc/runlevels.html b/doc/runlevels.html index b2a5604..c0e49c3 100644 --- a/doc/runlevels.html +++ b/doc/runlevels.html @@ -25,17 +25,17 @@ Create the following directories and symbolic links: # ln -s /etc/sv/getty-5 /etc/runit/runsvdir/single/ # ln -s default /etc/runit/runsvdir/current </pre> -Copy the contents of <tt>/var/service/</tt> to -<tt>/etc/runit/runsvdir/current/</tt> and replace <tt>/var/service/</tt> +Copy the contents of <tt>/service/</tt> to +<tt>/etc/runit/runsvdir/current/</tt> and replace <tt>/service/</tt> with a symbolic link: <pre> - # cp -pR /var/service/* /etc/runit/runsvdir/current/ - # mv -f /var/service /var/service.old && \ - ln -s /etc/runit/runsvdir/current /var/service + # cp -pR /service/* /etc/runit/runsvdir/current/ + # mv -f /service /service.old && \ + ln -s /etc/runit/runsvdir/current /service </pre> You have now created two runlevels: <tt>default</tt> and <tt>single</tt>. The <tt>current</tt> runlevel is <tt>default</tt>. -It is safe to remove <tt>/var/service.old/</tt> if you don't need it anymore. +It is safe to remove <tt>/service.old/</tt> if you don't need it anymore. <p> Finally edit <tt>/etc/runit/2</tt> to set the <tt>default</tt> runlevel when stage 2 starts: @@ -47,7 +47,7 @@ stage 2 starts: <b>runsvchdir default >/dev/null</b> exec env - PATH=$PATH \ - runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' + runsvdir /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' </pre> <hr> <a name="switch"><h3>Switching runlevels</h3></a> diff --git a/doc/runscripts.html b/doc/runscripts.html index aa275ce..f832b63 100644 --- a/doc/runscripts.html +++ b/doc/runscripts.html @@ -390,7 +390,7 @@ to be set up. <pre> #!/bin/sh exec 2>&1 - sv start /var/service/portmap || exit 1 + sv start /service/portmap || exit 1 exec famd -T 0 -f </pre> <hr> diff --git a/doc/runsv.8.html b/doc/runsv.8.html index 91646e8..3f430f1 100644 --- a/doc/runsv.8.html +++ b/doc/runsv.8.html @@ -108,9 +108,9 @@ command is ignored if it is given to <i>service</i>/log/supervise/control. </dd> <p> Example: to send a TERM signal to the socklog-unix service, either do # sv term -/var/service/socklog-unix<br> +/service/socklog-unix<br> or<br> - # printf t >/var/service/socklog-unix/supervise/control<br> + # printf t >/service/socklog-unix/supervise/control<br> <p> <i><b>printf</b>(1)</i> usually blocks if no <b>runsv</b> process is running in the service directory. diff --git a/doc/runsvchdir.8.html b/doc/runsvchdir.8.html index d9a6e43..ea3e585 100644 --- a/doc/runsvchdir.8.html +++ b/doc/runsvchdir.8.html @@ -20,8 +20,8 @@ If <i>dir</i> does not start with a slash, it is searched in /etc/runit/runsvdir <b>runsvchdir</b> switches to the directory <i>/etc/runit/runsvdir/</i>, copies <i>current</i> to <i>previous</i>, and replaces <i>current</i> with a symlink pointing to <i>dir</i>. <p> -Normally <i>/var/service</i> is a symlink to <i>current</i>, and <i><b>runsvdir</b>(8)</i> -is running <i>/var/service/</i>. +Normally <i>/service</i> is a symlink to <i>current</i>, and <i><b>runsvdir</b>(8)</i> +is running <i>/service/</i>. <h2><a name='sect3'>Exit Codes</a></h2> <b>runsvchdir</b> prints an error message and exits 111 on error. <b>runsvchdir</b> exits 0 on success. diff --git a/doc/sv.8.html b/doc/sv.8.html index fc688b5..1fb4d84 100644 --- a/doc/sv.8.html +++ b/doc/sv.8.html @@ -21,7 +21,7 @@ monitored by the <i><b>runsv</b>(8)</i> supervisor. <p> <i>services</i> consists of one or more arguments, each argument naming a directory <i>service</i> used by <i><b>runsv</b>(8)</i>. If <i>service</i> doesn’t start with a dot or slash, it is searched in the default services directory -<i>/var/service/</i>, otherwise relative to the current directory. <p> +<i>/service/</i>, otherwise relative to the current directory. <p> <i>command</i> is one of up, down, status, once, pause, cont, hup, alarm, interrupt, 1, 2, term, kill, or exit, or start, stop, restart, shutdown, force-stop, force-reload, @@ -157,7 +157,7 @@ implies <i>-v</i>. </dd> <dt><b>SVDIR</b> </dt> <dd>The environment variable $SVDIR overrides the -default services directory <i>/var/service/</i>. </dd> +default services directory <i>/service/</i>. </dd> <dt><b>SVWAIT</b> </dt> <dd>The environment variable diff --git a/doc/useinit.html b/doc/useinit.html index eb420b9..58adec2 100644 --- a/doc/useinit.html +++ b/doc/useinit.html @@ -21,10 +21,10 @@ adding <tt>/sbin/runsvdir-start</tt> to the system's <tt>StartupItems</tt>. <p> In any case, you first need to copy the <i>stage 2</i> script to <tt>/sbin/runsvdir-start</tt>, and create the services directory -<tt>/var/service/</tt>: +<tt>/service/</tt>: <pre> # install -m0750 /package/admin/runit/etc/2 /sbin/runsvdir-start - # mkdir -p /var/service + # mkdir -p /service </pre> <hr> <a href="#sysv">How to use with sysvinit and inittab</a><br> diff --git a/doc/utmpset.8.html b/doc/utmpset.8.html index f433c3e..3b96cb6 100644 --- a/doc/utmpset.8.html +++ b/doc/utmpset.8.html @@ -23,7 +23,7 @@ update the utmp file, the <i><b>getty</b>(8)</i> processes are handled the same other services. <p> To enable local login accounting, add <b>utmpset</b> to the <i><b>getty</b>(8)</i> <i>finish</i> scripts, e.g.: <p> - $ cat /var/service/getty-5/finish<br> + $ cat /service/getty-5/finish<br> #!/bin/sh<br> exec utmpset -w tty5<br> $<br> diff --git a/etc/2 b/etc/2 index 9720c3e..3bb822d 100755 --- a/etc/2 +++ b/etc/2 @@ -3,4 +3,4 @@ PATH=/command:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin exec env - PATH=$PATH \ -runsvdir -P /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' +runsvdir -P /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' diff --git a/etc/debian/3 b/etc/debian/3 index 5931ce6..10354d7 100755 --- a/etc/debian/3 +++ b/etc/debian/3 @@ -7,8 +7,8 @@ LAST=0 test -x /etc/runit/reboot && LAST=6 echo 'Waiting for services to stop...' -sv -w196 force-stop /var/service/* -sv exit /var/service/* +sv -w196 force-stop /service/* +sv exit /service/* echo 'Shutdown...' /etc/init.d/rc $LAST diff --git a/etc/freebsd/3 b/etc/freebsd/3 index c30bdb1..f7f9327 100755 --- a/etc/freebsd/3 +++ b/etc/freebsd/3 @@ -4,8 +4,8 @@ exec 2>&1 PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin echo 'Waiting for services to stop...' -sv -w196 force-stop /var/service/* -sv exit /var/service/* +sv -w196 force-stop /service/* +sv exit /service/* echo 'Shutdown...' if test -x /etc/runit/reboot; then diff --git a/etc/macosx/StartupItems/runit b/etc/macosx/StartupItems/runit index 6b4f0c4..9f0eaf3 100755 --- a/etc/macosx/StartupItems/runit +++ b/etc/macosx/StartupItems/runit @@ -12,8 +12,8 @@ StartService() { } StopService() { ConsoleMessage "Stopping runit service supervision" - sv -w196 force-stop /var/service/* - sv exit /var/service/* + sv -w196 force-stop /service/* + sv exit /service/* } RestartService() { return 0 diff --git a/etc/macosx/org.smarden.runit.plist b/etc/macosx/org.smarden.runit.plist index 5c4820f..1331f8a 100644 --- a/etc/macosx/org.smarden.runit.plist +++ b/etc/macosx/org.smarden.runit.plist @@ -8,7 +8,7 @@ <string>runsvdir - starts and monitors a collection of runsv(8) processes</string> <key>QueueDirectories</key> <array> - <string>/var/service</string> + <string>/service</string> </array> <key>OnDemand</key> <false/> diff --git a/etc/openbsd/3 b/etc/openbsd/3 index c30bdb1..f7f9327 100755 --- a/etc/openbsd/3 +++ b/etc/openbsd/3 @@ -4,8 +4,8 @@ exec 2>&1 PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin echo 'Waiting for services to stop...' -sv -w196 force-stop /var/service/* -sv exit /var/service/* +sv -w196 force-stop /service/* +sv exit /service/* echo 'Shutdown...' if test -x /etc/runit/reboot; then diff --git a/man/runsv.8 b/man/runsv.8 index 53f1b1b..7c5abfc 100644 --- a/man/runsv.8 +++ b/man/runsv.8 @@ -157,9 +157,9 @@ This command is ignored if it is given to .IR service /log/supervise/control. .P Example: to send a TERM signal to the socklog-unix service, either do - # sv term /var/service/socklog-unix + # sv term /service/socklog-unix or - # printf t >/var/service/socklog-unix/supervise/control + # printf t >/service/socklog-unix/supervise/control .P .BR printf (1) usually blocks if no diff --git a/man/runsvchdir.8 b/man/runsvchdir.8 index 793d653..f7f94dc 100644 --- a/man/runsvchdir.8 +++ b/man/runsvchdir.8 @@ -27,13 +27,13 @@ with a symlink pointing to .IR dir . .P Normally -.I /var/service +.I /service is a symlink to .IR current , and .BR runsvdir (8) is running -.IR /var/service/ . +.IR /service/ . .SH EXIT CODES .B runsvchdir prints an error message and exits 111 on error. diff --git a/man/sv.8 b/man/sv.8 index 9de05e4..cbce14e 100644 --- a/man/sv.8 +++ b/man/sv.8 @@ -30,7 +30,7 @@ If .I service doesn't start with a dot or slash and doesn't end with a slash, it is searched in the default services directory -.IR /var/service/ , +.IR /service/ , otherwise relative to the current directory. .P .I command @@ -217,7 +217,7 @@ This option implies .TP .B SVDIR The environment variable $SVDIR overrides the default services directory -.IR /var/service/ . +.IR /service/ . .TP .B SVWAIT The environment variable $SVWAIT overrides the default 7 seconds to wait diff --git a/man/utmpset.8 b/man/utmpset.8 index c93fe83..4f9b4ef 100644 --- a/man/utmpset.8 +++ b/man/utmpset.8 @@ -34,7 +34,7 @@ to the .I finish scripts, e.g.: .P - $ cat /var/service/getty-5/finish + $ cat /service/getty-5/finish #!/bin/sh exec utmpset \-w tty5 $ diff --git a/package/CHANGES b/package/CHANGES index b026c96..1ec4099 100644 --- a/package/CHANGES +++ b/package/CHANGES @@ -1,6 +1,7 @@ * doc/upgrade.html: typo. * sv.c: service name is also relative to the current directory if it ends with a slash. + * change default directory for services from /var/service/ to /service/. 1.8.0 Fri, 21 Sep 2007 00:33:56 +0000 diff --git a/src/sv.c b/src/sv.c index 0559abe..8269ca7 100644 --- a/src/sv.c +++ b/src/sv.c @@ -32,7 +32,7 @@ char *progname; char *action; char *acts; -char *varservice ="/var/service/"; +char *varservice ="/service/"; char **service; char **servicex; unsigned int services; |