From c802f4e68f36af6d4ff89fc33c50a1837e007b76 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Mon, 9 Mar 2009 11:44:23 -0500 Subject: runit don't symlink if it's already present. --- abs/core-testing/runit/PKGBUILD | 2 +- abs/core-testing/runit/runit.install | 23 +++++++---------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/abs/core-testing/runit/PKGBUILD b/abs/core-testing/runit/PKGBUILD index 1303167..90bb57e2 100755 --- a/abs/core-testing/runit/PKGBUILD +++ b/abs/core-testing/runit/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit pkgver=1.8.0 -pkgrel=61 +pkgrel=62 pkgdesc="A replacement for sysvinit, and other init schemes, with service supervision" url="http://smarden.org/runit/" license="BSD" diff --git a/abs/core-testing/runit/runit.install b/abs/core-testing/runit/runit.install index b6fcb07..1728bc6 100755 --- a/abs/core-testing/runit/runit.install +++ b/abs/core-testing/runit/runit.install @@ -27,29 +27,20 @@ fi } post_install () { - mkdir /var/service - 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 - ln -s /sbin/shutdown.script /sbin/shutdown - - + [ -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 - ln -s /sbin/shutdown.script /sbin/shutdown - + /bin/true } op=$1 -- cgit v0.12