Bug 252255

Summary: anacron unhappy on a startup about connection to hald due to ordering
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: anacronAssignee: Marcela Mašláňová <mmaslano>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: jik, s.adam
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-17 10:30:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2007-08-14 22:39:19 UTC
Description of problem:

Every time on a startup the following shows up:

Starting anacron: Could not initialise connection to hald.
Normally this means the HAL daemon (hald) is not running or not ready.
                                                           [  OK  ]

hald indeed at this moment is not yet running because in
/etc/init.d/anacron one can find

# chkconfig: 2345 95 05

while in 'haldaemon' script

# chkconfig: 345 98 02

so that order should be reversed.

Even with that problem 'anacron' process is running although
'service anacron status' responds "cron.daily is stopped" which
really is not that informative and it would be nice to have
some indication about the process itself.

Version-Release number of selected component (if applicable):
anacron-2.3-50.fc8

How reproducible:
always

Comment 1 Marcela Mašláňová 2007-08-15 11:36:29 UTC
Thanks for report. I moved anacron after hald.

Comment 2 Marcela Mašláňová 2007-08-15 11:42:11 UTC
*** Bug 252166 has been marked as a duplicate of this bug. ***

Comment 3 Marcela Mašláňová 2007-08-16 07:01:28 UTC
*** Bug 252454 has been marked as a duplicate of this bug. ***

Comment 4 Michal Jaegermann 2007-08-16 20:42:53 UTC
> I moved anacron after hald.

No quite, I am afraid.  Until you will do

   /sbin/chkconfig --del anacron
   /sbin/chkconfig --add anacron

old links /etc/rc.d/rc.?d/S95anacron stay and a problem is still there.

You could do the above in %post - say conditionally if one
of /etc/rc.d/rc.?d/S95anacron links exist.  Something like that:

   for l in /etc/rc.d/rc.?d/S95anacron ; do
     [ -h $l ] || continue
     mv $l ${l%95anacron}"99anacron"
   done

That should handle safely also situations when anacron was turned off.

Strictly speaking instead of "/etc/rc.d" above likely an ouput
of "dirname %{_initrdir}" should be used.

Comment 5 Marcela Mašláňová 2007-08-17 10:30:20 UTC
Thank you, it was really helping.

I believe the only macros, which can be used in spec file could be found in 
/usr/share/doc/rpm-4.4.2/macros and %{_initrdir} isn't there.

Comment 6 Michal Jaegermann 2007-08-17 17:09:11 UTC
> I believe the only macros, which can be used in spec file
> could be found in /usr/share/doc/rpm-4.4.2/macros

I really do not know what formal requirements are here and besides I
made a typo.  It is %_initrddir and you can find it in an output
of 'grep -r _initrddir /usr/lib/rpm/' and 'rpm --showrc' defined
in terms of %{_sysconfdir}.  Possibly the later one should be there
instead.