aboutsummaryrefslogtreecommitdiffstats
path: root/main/sysklogd/sysklogd.pre-deinstall
diff options
context:
space:
mode:
Diffstat (limited to 'main/sysklogd/sysklogd.pre-deinstall')
-rw-r--r--main/sysklogd/sysklogd.pre-deinstall6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/sysklogd/sysklogd.pre-deinstall b/main/sysklogd/sysklogd.pre-deinstall
index ce50a1b7f4..0f985254e7 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