From 29c4521100d47a589c89ef3145db61f9e4a00cf9 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Sun, 20 Apr 2008 20:47:39 +0000 Subject: * change default directory for services from /var/service/ to /service/. --- doc/benefits.html | 2 +- doc/faq.html | 8 ++++---- doc/replaceinit.html | 8 ++++---- doc/runlevels.html | 14 +++++++------- doc/runscripts.html | 2 +- doc/runsv.8.html | 4 ++-- doc/runsvchdir.8.html | 4 ++-- doc/sv.8.html | 4 ++-- doc/useinit.html | 4 ++-- doc/utmpset.8.html | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) (limited to 'doc') 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. Stage 2 is packaging friendly: all a software package that provides a service needs to do is to include a service directory in the package, and to provide a symbolic link -to this directory in /var/service/. +to this directory in /service/. 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?

Answer: -Create a symbolic link in /var/service/ pointing to the service +Create a symbolic link in /service/ 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.:

- # ln -s /etc/sv/getty-2 /var/service/
+ # ln -s /etc/sv/getty-2 /service/
 

@@ -283,13 +283,13 @@ supervision. How do I tell runit?

Answer: -Remove the symbolic link in /var/service/ pointing to the service +Remove the symbolic link in /service/ 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.:

- # rm /var/service/getty-2
+ # rm /service/getty-2
 

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 /etc/inittab and kill -HUP 1 if needed), and tell runsvdir about the getty-5 service:
- # mkdir -p /var/service
- # ln -s /etc/sv/getty-5 /var/service/
+ # mkdir -p /service
+ # ln -s /etc/sv/getty-5 /service/
 
Start runit's stage 2 for testing:
@@ -177,8 +177,8 @@ FreeBSD 4.4:
 and tell runsvdir about the getty-5
 service:
 
- # mkdir -p /var/service
- # ln -s /etc/sv/getty-5 /var/service/
+ # mkdir -p /service
+ # ln -s /etc/sv/getty-5 /service/
 
Start runit's stage 2 for testing:
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
 
-Copy the contents of /var/service/ to -/etc/runit/runsvdir/current/ and replace /var/service/ +Copy the contents of /service/ to +/etc/runit/runsvdir/current/ and replace /service/ with a symbolic link:
- # 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
 
You have now created two runlevels: default and single. The current runlevel is default. -It is safe to remove /var/service.old/ if you don't need it anymore. +It is safe to remove /service.old/ if you don't need it anymore.

Finally edit /etc/runit/2 to set the default runlevel when stage 2 starts: @@ -47,7 +47,7 @@ stage 2 starts: runsvchdir default >/dev/null exec env - PATH=$PATH \ - runsvdir /var/service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................' + runsvdir /service 'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'


Switching runlevels

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.
  #!/bin/sh
  exec 2>&1
- sv start /var/service/portmap || exit 1
+ sv start /service/portmap || exit 1
  exec famd -T 0 -f
 

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 service/log/supervise/control.

Example: to send a TERM signal to the socklog-unix service, either do # sv term -/var/service/socklog-unix
+/service/socklog-unix
or
- # printf t >/var/service/socklog-unix/supervise/control
+ # printf t >/service/socklog-unix/supervise/control

printf(1) usually blocks if no runsv 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 dir does not start with a slash, it is searched in /etc/runit/runsvdir runsvchdir switches to the directory /etc/runit/runsvdir/, copies current to previous, and replaces current with a symlink pointing to dir.

-Normally /var/service is a symlink to current, and runsvdir(8) -is running /var/service/. +Normally /service is a symlink to current, and runsvdir(8) +is running /service/.

Exit Codes

runsvchdir prints an error message and exits 111 on error. runsvchdir 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 runsv(8) supervisor.

services consists of one or more arguments, each argument naming a directory service used by runsv(8). If service doesn’t start with a dot or slash, it is searched in the default services directory -/var/service/, otherwise relative to the current directory.

+/service/, otherwise relative to the current directory.

command 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 -v.

SVDIR
The environment variable $SVDIR overrides the -default services directory /var/service/.
+default services directory /service/.
SVWAIT
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 /sbin/runsvdir-start to the system's StartupItems.

In any case, you first need to copy the stage 2 script to /sbin/runsvdir-start, and create the services directory -/var/service/: +/service/:

  # install -m0750 /package/admin/runit/etc/2 /sbin/runsvdir-start
- # mkdir -p /var/service
+ # mkdir -p /service
 

How to use with sysvinit and inittab
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 getty(8) processes are handled the same other services.

To enable local login accounting, add utmpset to the getty(8) finish scripts, e.g.:

- $ cat /var/service/getty-5/finish
+ $ cat /service/getty-5/finish
#!/bin/sh
exec utmpset -w tty5
$
-- cgit 1.4.1