aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/busybox/busybox.inc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-01-04 04:02:04 +0000
committerKhem Raj <raj.khem@gmail.com>2011-01-15 15:58:55 -0800
commit1ecc0d94974809f4279829157fe3ba047f315aba (patch)
tree3b9b624fcda50590d873a77aa2acfe566a4204d2 /recipes/busybox/busybox.inc
parentb630a52eeff1143a9bb115fd148fb520440e049d (diff)
downloadopenembedded-1ecc0d94974809f4279829157fe3ba047f315aba.tar.gz
busybox: simplify update-rc.d OPT handling
style-only change Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes/busybox/busybox.inc')
-rw-r--r--recipes/busybox/busybox.inc12
1 files changed, 2 insertions, 10 deletions
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 59653e011d..b105337930 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -291,11 +291,7 @@ pkg_prerm_${PN}-shadow () {
pkg_postinst_${PN}-syslog () {
update-alternatives --install ${sysconfdir}/init.d/syslog syslog-init syslog.${PN} 50
- if test "x$D" != "x"; then
- OPT="-r $D"
- else
- OPT="-s"
- fi
+ [ -n "$D" ] && OPT="-r $D" || OPT="-s"
# remove all rc.d-links potentially created from alternative
# syslog packages before creating new ones
update-rc.d $OPT -f syslog remove
@@ -313,13 +309,9 @@ pkg_prerm_${PN}-syslog () {
}
pkg_postrm_${PN}-syslog () {
- if test "x$D" != "x"; then
- OPT="-r $D"
- else
- OPT=""
- fi
if test "$1" = "remove" -o "$1" = "purge"; then
if ! test -e "/etc/init.d/syslog"; then
+ [ -n "$D" ] && OPT="-r $D" || OPT="-s"
update-rc.d $OPT syslog remove
fi
fi