Bug 508213 - install_initd fails on Required-Start
install_initd fails on Required-Start
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: redhat-lsb (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Lawrence Lim
Fedora Extras Quality Assurance
: Reopened
: 512547 (view as bug list)
Depends On:
Blocks: 632294
  Show dependency treegraph
 
Reported: 2009-06-26 04:02 EDT by Enrico Scholz
Modified: 2014-03-25 20:58 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 522053 632294 (view as bug list)
Environment:
Last Closed: 2010-06-28 09:18:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Call chkconfig with proper arguments (1.67 KB, patch)
2009-11-23 22:40 EST, Todd Zullinger
no flags Details | Diff

  None (edit)
Description Enrico Scholz 2009-06-26 04:02:23 EDT
Description of problem:

When an initscript contains a 'Required-Start:' tag, install_initd fails silently with exit code 1.

E.g. /etc/init.d/foo contains

---
#! /bin/sh
#
### BEGIN INIT INFO
# Provides:             foo
# Short-Description:    foo
# Description:          foo
# Required-Start:       $network
### END INIT INFO
#
# chkconfig: - 99 1
---

Then

# /usr/lib/lsb/install_initd /etc/init.d/foo ; echo $?
1

and links are not created.


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

redhat-lsb-3.2-3.fc11.x86_64
chkconfig-1.3.42-1.x86_64


How reproducible:

100%
Comment 1 Enrico Scholz 2009-07-19 04:10:05 EDT
*** Bug 512547 has been marked as a duplicate of this bug. ***
Comment 2 Todd Zullinger 2009-11-23 22:40:06 EST
Created attachment 373335 [details]
Call chkconfig with proper arguments

The problem seems to be that {install,remove}_initd are simply symlinks to chkconfig.  Yet chkconfig requires --add/--del to perform installation and removal of init script symlinks.

Attached is a hackish solution for this.  Ideally {install,remove}_initd scripts would be included in the redhat-lsb tarball.
Comment 3 Bill Nottingham 2010-03-16 15:43:17 EDT
Todd - chkconfig automatically does the proper behavior if invoked as install_initd.

I suspect what's happening here is that he doesn't have a service that provides $network installed/activated. In that case, we don't add links when we're running in LSB mode. This is to properly implement the LSB standard.
Comment 4 Enrico Scholz 2010-03-16 16:20:16 EDT
Suspection in comment 3 is wrong; it happens whenever Required-Start: is used:

---- /etc/init.d/bar ----
#! /bin/sh
#
### BEGIN INIT INFO
# Provides:             bar
# Short-Description:    bar
# Description:          bar
### END INIT INFO
#
# chkconfig: - 99 1

---- /etc/init.d/foo ----
#! /bin/sh
#
### BEGIN INIT INFO
# Provides:             foo
# Short-Description:    foo
# Description:          foo
# Required-Start:       bar
### END INIT INFO
#
# chkconfig: - 99 1

# /usr/lib/lsb/install_initd /etc/init.d/bar; echo $?; ls -l /etc/rc3.d/*bar
0
lrwxrwxrwx. 1 root root 13 Mar 16 21:18 /etc/rc3.d/K01bar -> ../init.d/bar

# /usr/lib/lsb/install_initd /etc/init.d/foo; echo $?; ls -l /etc/rc3.d/*foo 
1
ls: cannot access /etc/rc3.d/*foo: No such file or directory


chkconfig-1.3.44-1.x86_64
redhat-lsb-3.2-7.fc12.x86_64
Comment 5 Bug Zapper 2010-04-27 11:16:01 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 6 Bug Zapper 2010-06-28 09:18:14 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Craig Scott 2010-09-08 23:57:34 EDT
I can confirm that this bug is still present in Fedora 13 and indeed it is a bug. Use the following script as a test (I have it at /etc/init.d/initTester):

#!/bin/sh
#
### BEGIN INIT INFO
# Provides:          initTester
# Required-Start:    $local_fs
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Test script
### END INIT INFO


If you then use this script with install_initd it fails silently:

/usr/lib/lsb/install_initd /etc/init.d/initTester

HOWEVER, if you invoke chkconfig directly with the --add parameter, it DOES work:

/sbin/chkconfig --add /etc/init.d/initTester


After some testing, I can confirm that if you remove the Required-Start line, then install_initd does work. During my testing, all local file systems were successfully mounted, so the $local_fs service is indeed available and should be considered so by install_initd.

I don't seem to be able to re-open this bug, so could someone with the relevant permissions please do so? Cheers.
Comment 8 Bill Nottingham 2010-09-09 11:47:00 EDT
I cloned the bug as a new bug, bug 632994. FYI, this should only affect $local_fs.

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