-
Notifications
You must be signed in to change notification settings - Fork 0
/
runit-run.install
54 lines (45 loc) · 1.48 KB
/
runit-run.install
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
post_install() {
<<<<<<< HEAD
if [ ! -f /sbin/init.sysv ];then
echo "Moving /sbin/init to /sbin/init.sysv"
mv /sbin/init /sbin/init.sysv
fi
if [ ! -L /sbin/init ];then
echo "Linking /sbin/init to runit-init"
ln -sf runit-init /sbin/init
fi
init=$(readlink /sbin/init)
if [ "$init" != "runit-init" ];then
mv /sbin/init /sbin/init.bak.$(date +%s)
ln -sf runit-init /sbin/init
fi
if [ ! -L /etc/runit/runsvdir/default ];then
echo "Linking /etc/runit/runsvdir/default to /etc/runit/runsvdir/runit-run-default"
ln -sf /etc/runit/runsvdir/runit-run-default /etc/runit/runsvdir/default
fi
=======
post_upgrade
echo "Linking /etc/runit/runsvdir/default to /etc/runit/runsvdir/runit-run-default"
ln -sf /etc/runit/runsvdir/runit-run-default /etc/runit/runsvdir/default
>>>>>>> 4eba5ca1d25fed66c15f68e2964d76f9c63a450b
echo "Changing runsvdir to /etc/runit/runsvdir/default"
runsvchdir default
if [ ! -L /service ];then
echo "Linking /service to /etc/runit/runsvdir/current"
ln -s /etc/runit/runsvdir/current /service
fi
echo "Runit-run is installed, restart with
/sbin/init.sysv 6."
}
post_upgrade() {
if [ ! -L /sbin/init ];then
echo "Moving /sbin/init to /sbin/init.sysv"
mv /sbin/init /sbin/init.sysv
fi
echo "Linking /sbin/init to runit-init"
ln -sf runit-init /sbin/init
}
post_remove() {
[ -L /sbin/init ] && [ -f /sbin/init.sysv ] && rm /sbin/init && mv /sbin/init.sysv /sbin/init
}
# vim:set ts=2 sw=2 et: