Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 125517

Summary: sys-apps/hal pkg_postinst improvement
Product: Gentoo Linux Reporter: Paweł Hajdan, Jr. (RETIRED) <phajdan.jr>
Component: [OLD] Core systemAssignee: Project Gentopia <gentopia>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2006-03-08 12:39:08 UTC
Information about adding hald to "default" runlevel should be printed only when it is not actually added. Proposed patch:

--- hal-0.5.5.1-r3.ebuild.old   2006-03-08 21:34:35.000000000 +0100
+++ hal-0.5.5.1-r3.ebuild       2006-03-08 21:35:24.000000000 +0100
@@ -124,8 +124,10 @@
 }

 pkg_postinst() {
-       einfo "The HAL daemon needs to be running for certain applications to"
-       einfo "work. Suggested is to add the init script to your start-up"
-       einfo "scripts, this should be done like this :"
-       einfo "\`rc-update add hald default\`"
+       if ! $(rc-status default | grep -q hald); then
+               einfo "The HAL daemon needs to be running for certain applications to"
+               einfo "work. Suggested is to add the init script to your start-up"
+               einfo "scripts, this should be done like this :"
+               einfo "\`rc-update add hald default\`"
+       fi
 }
Comment 1 Joe McCann (RETIRED) gentoo-dev 2006-03-09 10:42:05 UTC
I don't think this is correct for the same reasons I listed in the dbus bug ( bug 125521 ). If building a pkg for another machine, this message is still valid. There is also no harm in showing it unconditionally. I'm closing this one since it only deals with the run level message and I don't consider that a bug.