[oe-commits] Bernhard Reutner-Fischer : busybox: simplify update-rc.d OPT handling
git version control
git at git.openembedded.org
Wed Feb 16 17:56:20 UTC 2011
Module: openembedded.git
Branch: shr/testing2011.1
Commit: 59ed7fb2784a8150b4c9db461232672cf027e160
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=59ed7fb2784a8150b4c9db461232672cf027e160
Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Date: Tue Jan 4 04:02:04 2011 +0000
busybox: simplify update-rc.d OPT handling
style-only change
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
Acked-by: Otavio Salvador <otavio at ossystems.com.br>
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
recipes/busybox/busybox.inc | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index 53bbfca..03efc99 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -296,11 +296,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
@@ -318,13 +314,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
More information about the Openembedded-commits
mailing list