summaryrefslogtreecommitdiff
path: root/sysutils/runit/files/pkg-message.in
blob: 653ecfadb8a3d62c8b34dab313f6edf4d243d5b7 (plain)
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
Using runit with FreeBSD init:

# mkdir %%SERVICE_DIR%%
# cp -R %%PREFIX%%/etc/runit /etc/runit
# echo runsvdir_enable=yes >> /etc/rc.conf

runit is very easily used instead of init on FreeBSD, but the port maintainer
suggests the following alternative method (as opposed to the website method):

1. Copy all of the etc files from %%PREFIX%%/etc/runit to /etc/runit;

# cp -R %%PREFIX%%/etc/runit /etc/runit

2. Copy runit-init AND runit into /sbin;

# cp /usr/local/sbin/runit* /sbin

3. Create service directories, enable ttyv4 and disable it in ttys:

# mkdir %%SERVICE_DIR%%
# cp -R /etc/runit/getty-ttyv4 %%SERVICE_DIR%%
# sed 's/^ttyv4/#&/' /etc/ttys

(The getty-ttyvx directory will getty on whichever vtty x is on, for example
 # cp -R %%SERVICE_DIR%%/getty-ttyv4 %%SERVICE_DIR%%/getty-ttyv3
 will result in a tty on ttyv3 as well)

4. Don't replace FreeBSD init in place, tell loader to use runit instead:

# echo 'init_path="/sbin/runit-init:/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init"' >> /boot/loader.conf

5. Reboot!

Note: On FreeBSD, runit-init works in %%PREFIX%%/sbin, but
      *only* if %%PREFIX%%/sbin is on the same filesystem as /; check with:

# df %%PREFIX%%/sbin/runit | sed -ne 's,.* /,/,p' # If this does not return "/"

      If the output is "/", you may skip step 2 and modify step 4:

# echo 'init_path="%%PREFIX%%/sbin/runit-init:/sbin/init:/sbin/oninit:/sbin/init.bak:/rescue/init"' >> /boot/loader.conf

      making upgrades easier.