summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-07-07 20:20:44 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-07-07 20:20:44 +0300
commit231c996c2f1c11953ea9abe8fa6fa74d767dff0d (patch)
treee3554fc622baf3a910fa27249678f3759d469f39
parent0f57ae191874527c2543629f2a87df2865950ade (diff)
downloadaports-231c996c2f1c11953ea9abe8fa6fa74d767dff0d.tar.bz2
aports-231c996c2f1c11953ea9abe8fa6fa74d767dff0d.tar.xz
main/sysklogd: fix the (un)install script
.. to not mangle with rc-update if the logger we expected was not in system startup sequence. Otherwise we might insert ourselves in wrong boot up target.
-rw-r--r--main/sysklogd/APKBUILD2
-rw-r--r--main/sysklogd/sysklogd.post-install6
-rw-r--r--main/sysklogd/sysklogd.pre-deinstall6
3 files changed, 9 insertions, 5 deletions
diff --git a/main/sysklogd/APKBUILD b/main/sysklogd/APKBUILD
index 28edde402..233fd071e 100644
--- a/main/sysklogd/APKBUILD
+++ b/main/sysklogd/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sysklogd
pkgver=1.5
-pkgrel=12
+pkgrel=13
pkgdesc="System and kernel log daemons"
url="http://www.infodrom.org/projects/sysklogd/"
arch="all"
diff --git a/main/sysklogd/sysklogd.post-install b/main/sysklogd/sysklogd.post-install
index 939886d38..b4eda2092 100644
--- a/main/sysklogd/sysklogd.post-install
+++ b/main/sysklogd/sysklogd.post-install
@@ -1,5 +1,7 @@
#!/bin/sh
INIT=syslog
RUNLEVEL=`rc-update show | grep $INIT | awk '{ print $3 }'`
-rc-update del $INIT $RUNLEVEL &>/dev/null
-rc-update add sysklogd $RUNLEVEL &>/dev/null
+if [ -n "$RUNLEVEL" ]; then
+ rc-update del $INIT $RUNLEVEL &>/dev/null
+ rc-update add sysklogd $RUNLEVEL &>/dev/null
+fi
diff --git a/main/sysklogd/sysklogd.pre-deinstall b/main/sysklogd/sysklogd.pre-deinstall
index ce50a1b7f..0f985254e 100644
--- a/main/sysklogd/sysklogd.pre-deinstall
+++ b/main/sysklogd/sysklogd.pre-deinstall
@@ -1,5 +1,7 @@
#!/bin/sh
INIT=sysklogd
RUNLEVEL=`rc-update show | grep $INIT | awk '{ print $3 }'`
-rc-update del $INIT $RUNLEVEL &>/dev/null
-rc-update add syslog $RUNLEVEL &>/dev/null
+if [ -n "$RUNLEVEL" ]; then
+ rc-update del $INIT $RUNLEVEL &>/dev/null
+ rc-update add syslog $RUNLEVEL &>/dev/null
+fi