summaryrefslogtreecommitdiffstats
path: root/abs/core/runit/runit.install
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/runit/runit.install')
-rwxr-xr-xabs/core/runit/runit.install40
1 files changed, 16 insertions, 24 deletions
diff --git a/abs/core/runit/runit.install b/abs/core/runit/runit.install
index 4652368..1728bc6 100755
--- a/abs/core/runit/runit.install
+++ b/abs/core/runit/runit.install
@@ -4,9 +4,10 @@ pre_install () {
if [ ! -f /sbin/halt-init ]
then
mv /sbin/halt /sbin/halt-init
+ mv /sbin/shutdown /sbin/shutdown-init
+fi
rm -f /sbin/reboot
rm -f /sbin/poweroff
-fi
}
@@ -14,41 +15,32 @@ pre_upgrade () {
if [ ! -f /sbin/halt-init ]
then
mv /sbin/halt /sbin/halt-init
+fi
+
+if [ ! -f /sbin/shutdown-init ]
+then
+ mv /sbin/shutdown /sbin/shutdown-init
+fi
rm -f /sbin/reboot
rm -f /sbin/poweroff
-fi
}
post_install () {
-
- mkdir /var/service
- ln -s /etc/sv/tty* /var/service
- servicelist="acpid cron frontend lircd ntpd alsa-utils avahi dbus portmap sshd"
- for i in $servicelist
- do
- ln -s /etc/sv/$i /var/service/$i
- done
-
- ln -s /sbin/halt.script /sbin/halt
- ln -s /sbin/reboot.script /sbin/reboot
- ln -s /sbin/poweroff.script /sbin/poweroff
- ln -s /sbin/halt-init /sbin/reboot.init
- ln -s /sbin/halt-init /sbin/poweroff.init
-
-
+ mkdir /var/service
+ [ -e /sbin/halt ] || ln -s /sbin/halt.script /sbin/halt
+ [ -e /sbin/reboot ] || ln -s /sbin/reboot.script /sbin/reboot
+ [ -e /sbin/poweroff ] || ln -s /sbin/poweroff.script /sbin/poweroff
+ [ -e /sbin/reboot.init ] || ln -s /sbin/halt-init /sbin/reboot.init
+ [ -e /sbin/poweroff.init ] || ln -s /sbin/halt-init /sbin/poweroff.init
+ [ -e /sbin/shutdown ] || ln -s /sbin/shutdown.script /sbin/shutdown
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade(){
- ln -s /sbin/halt.script /sbin/halt
- ln -s /sbin/reboot.script /sbin/reboot
- ln -s /sbin/poweroff.script /sbin/poweroff
- ln -s /sbin/halt-init /sbin/reboot.init
- ln -s /sbin/halt-init /sbin/poweroff.init
-
+ /bin/true
}
op=$1