Bug 161470 - Duplicate "Starting postgresql" at boot
Duplicate "Starting postgresql" at boot
Product: Fedora
Classification: Fedora
Component: postgresql (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Tom Lane
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-06-23 12:31 EDT by Ian Pilcher
Modified: 2013-07-02 23:06 EDT (History)
3 users (show)

See Also:
Fixed In Version: 8.1.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-11 11:43:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to /etc/rc.d/rc to special-case lm_sensors (419 bytes, patch)
2005-06-23 12:32 EDT, Ian Pilcher
no flags Details | Diff
Make the init.d/functions inclusion detectable by /etc/rc.d/rc (594 bytes, patch)
2006-11-11 22:09 EST, Miloslav Trmač
no flags Details | Diff

  None (edit)
Description Ian Pilcher 2005-06-23 12:31:16 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
When lm_sensors is enabled ('chkconfig lm_sensors on'), "Starting lm_sensors:"
is printed twice when the system boots:

  Starting lm_sensors: Starting lm_sensors:          [ OK ]

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  Run /usr/sbin/sensors-detect to configure lm_sensors.
2.  '/sbin/chkconfig lm_sensors on' to enable lm_sensors.
3.  Reboot.

Actual Results:  Starting lm_sensors: Starting lm_sensors:            [ OK ]

Expected Results:  Starting lm_sensors:                                 [ OK ]

Additional info:

I'm submitting this as an initscripts bug, since my patch modifies /etc/rc.d/rc.

(BTW, the test at line 87 of /etc/rc.d/rc seems awfully hackish; is there really
not a better way?)
Comment 1 Ian Pilcher 2005-06-23 12:32:31 EDT
Created attachment 115881 [details]
Patch to /etc/rc.d/rc to special-case lm_sensors
Comment 2 Ian Pilcher 2005-06-29 14:58:11 EDT
BTW, PostgreSQL suffers from a similar problem on shutdown.
Comment 3 Adam Pribyl 2005-09-30 14:30:29 EDT
I can confirm this for postfix happening too. It is not high priority but it
also seems easy to fix. (and was not present in FC3) 

This is one of these bugs that do not harm, but are pretty visible for user.
Comment 4 Miloslav Trmač 2006-11-11 21:47:20 EST
initscripts-8.42 has changed the "native service" detection, which fixes
lm-sensors and postfix.

Reassigning to postgresql.
Comment 5 Miloslav Trmač 2006-11-11 22:09:49 EST
Created attachment 140979 [details]
Make the init.d/functions inclusion detectable by /etc/rc.d/rc

This patch fixes the problem for postgresql.
Comment 6 Tom Lane 2006-11-12 00:01:57 EST
Huh?  That patch looks like a complete no-op to me.  What is the underlying problem exactly?
Comment 7 Miloslav Trmač 2006-11-12 00:10:14 EST
See /etc/rc.d/rc:
        if LC_ALL=C egrep -q "^..*init.d/functions" $i \
                        || [ "$subsys" = "single" -o "$subsys" = "local" ]; then
                $i start
                action $"Starting $subsys: " $i start

". $INITD/functions" is not matched by the grep, so rc helpfully attempts to
provide the "starting postgresql" message and the "[ OK ]" status indication.
Comment 8 Tom Lane 2006-11-12 00:21:39 EST
Eeek.  I have to agree with Ian's original comment that there should be a better way.  But at the same time 
there's no particular use in the INITD variable in postgresql.init, so will comply in next turn.
Comment 9 Tom Lane 2007-01-11 11:43:22 EST
I've modified postgresql.init in the latest packages for FC5 and up.

Note You need to log in before you can comment on or make changes to this bug.