summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/runit-scripts/runit.install
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-03-09 16:41:39 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-03-09 16:41:39 (GMT)
commita962fbdaa7253d70c1e0d104eb84886d2e5115b0 (patch)
treedbb43f8a00ebf26a0d2dd2364629e94ec4f3362c /abs/core-testing/runit-scripts/runit.install
parent84cfad2c9cd6bba15d84e31ee927f339cd9b1ff6 (diff)
downloadlinhes_pkgbuild-a962fbdaa7253d70c1e0d104eb84886d2e5115b0.zip
linhes_pkgbuild-a962fbdaa7253d70c1e0d104eb84886d2e5115b0.tar.gz
linhes_pkgbuild-a962fbdaa7253d70c1e0d104eb84886d2e5115b0.tar.bz2
don't symlink if the links are already present
Diffstat (limited to 'abs/core-testing/runit-scripts/runit.install')
-rwxr-xr-xabs/core-testing/runit-scripts/runit.install20
1 files changed, 10 insertions, 10 deletions
diff --git a/abs/core-testing/runit-scripts/runit.install b/abs/core-testing/runit-scripts/runit.install
index 4b97199..1e3f619 100755
--- a/abs/core-testing/runit-scripts/runit.install
+++ b/abs/core-testing/runit-scripts/runit.install
@@ -29,11 +29,11 @@ post_install () {
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
+ [ -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
}
@@ -42,12 +42,12 @@ post_install () {
# 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
+ [ -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
}
op=$1