Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 423441 - various init.d scripts' restart appears to be broke
Summary: various init.d scripts' restart appears to be broke
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 07:37 UTC by Natanael Copa
Modified: 2012-08-24 21:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2012-06-25 07:37:34 UTC
Some init.d scripts (like showreall) has a restart() function that is supposed to be triggered on '/etc/init.d/<svc> restart'. It seems like this never happens.

Looking at the runscript.c code (http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=blob;f=src/rc/runscript.c;h=e504e4a94e3ed5a9e8436b5e00e2ca142c64a2ae;hb=HEAD#l1025) it seems like this is by design, to make sure that restarting dependencies etc works properly. The restart() function has probably never worked with openrc.

I discovered this because actually stopping and starting shorewall instead of letting shorewall do the restart as the script tries to do, broke things for once of my users.

The question is, should this be fixed in openrc or should it be documented that restart() is not supported and the scripts would need to use "reload" or similar when stopping/starting needs to be overridden like in the shorewall case?

Affected scripts appears to be:
$ grep '^restart *()' /var/portage/*/*/files/* 2>/dev/null
/var/portage/app-accessibility/espeakup/files/espeakup.rc:restart() {
/var/portage/app-admin/mcollective/files/mcollectived.initd:restart() {
/var/portage/app-emulation/ganeti/files/ganeti-kvm-poweroff.initd:restart() {
/var/portage/app-emulation/xen-tools/files/xend.initd-r1:restart() {
/var/portage/dev-db/firebird/files/firebird.init.d:restart(){
/var/portage/dev-db/firebird/files/firebird.init.d.2.5:restart(){
/var/portage/dev-db/pgpool2/files/pgpool2.initd:restart() {
/var/portage/mail-filter/amavisd-milter/files/amavisd-milter.initd:restart() {
/var/portage/mail-filter/amavisd-new/files/amavisd.initd:restart() {
/var/portage/mail-filter/p3scan/files/p3scan.init:restart() {
/var/portage/media-sound/teamspeak-server-bin/files/teamspeak3-server.rc:restart() {
/var/portage/net-analyzer/nagios-nrpe/files/nrpe:restart() {
/var/portage/net-analyzer/nagios-nrpe/files/nrpe-nagios3:restart() {
/var/portage/net-analyzer/nagios-nsca/files/nsca:restart() {
/var/portage/net-analyzer/nagios-nsca/files/nsca-nagios3:restart() {
/var/portage/net-analyzer/pnp4nagios/files/npcd:restart() {
/var/portage/net-dns/knot/files/knot.init:restart() {
/var/portage/net-firewall/firehol/files/firehol.initrd:restart() {
/var/portage/net-firewall/lutelwall/files/lutelwall:restart() {
/var/portage/net-firewall/shorewall-lite/files/shorewall-lite:restart() {
/var/portage/net-firewall/shorewall/files/shorewall.initd:restart() {
/var/portage/net-firewall/shorewall6-lite/files/shorewall6-lite.initd:restart() {
/var/portage/net-firewall/shorewall6/files/shorewall6.initd:restart() {
/var/portage/net-fs/autofs/files/autofs.rc11:restart() {
/var/portage/net-fs/autofs/files/autofs.rc12:restart() {
/var/portage/net-fs/autofs/files/autofs.rc13:restart() {
/var/portage/net-fs/autofs/files/autofs.rc14:restart() {
/var/portage/net-fs/nfs-utils/files/nfs.initd:restart() {
/var/portage/net-misc/hylafax/files/hylafax.init:restart() {
/var/portage/net-misc/ip-sentinel/files/ip-sentinel.init:restart () {
/var/portage/net-misc/strongswan/files/ipsec:restart() {
/var/portage/net-misc/stunnel/files/stunnel.initd:restart() {
/var/portage/net-misc/tigervnc/files/tigervnc.initd:restart() {
/var/portage/net-misc/tightvnc/files/tightvnc.initd:restart() {
/var/portage/net-misc/zebedee/files/zebedee:restart() {
/var/portage/net-nds/389-ds-base/files/389-ds-snmp.initd:restart() {
/var/portage/net-nds/portmap/files/portmap.rc6:restart() {
/var/portage/net-p2p/amule/files/amuled.initd:restart() {
/var/portage/net-p2p/bitflu/files/bitflu.initd:restart() {
/var/portage/net-p2p/btpd/files/initd_btpd:restart() {
/var/portage/net-p2p/gift/files/gift.initd:restart() {
/var/portage/net-p2p/gnunet/files/gnunet.initd:restart() {
/var/portage/net-p2p/mldonkey/files/mldonkey.initd:restart() {
/var/portage/net-zope/zope/files/zope.initd:restart() {
/var/portage/sys-apps/ibm-powerpc-utils-papr/files/ibmvscsis:restart() {
/var/portage/sys-cluster/cluster-glue/files/heartbeat-logd.init:restart() {
/var/portage/sys-cluster/csync2/files/csync2.initd:restart() {
/var/portage/sys-cluster/heartbeat/files/heartbeat-init:restart() {
/var/portage/sys-cluster/pacemaker-gui/files/mgmtd.init:restart() {
/var/portage/sys-cluster/torque/files/pbs_mom-init.d:restart() {
/var/portage/sys-cluster/torque/files/pbs_mom-init.d-munge:restart() {
/var/portage/sys-freebsd/freebsd-cddl/files/zvol.initd:restart() {
/var/portage/sys-process/audit/files/auditd-init.d-1.2.3:restart() {
/var/portage/sys-process/audit/files/auditd-init.d-1.7.17:restart() {
/var/portage/sys-process/audit/files/auditd-init.d-2.1.3:restart() {
/var/portage/www-apps/rt/files/rt.init.d:restart() {
/var/portage/www-misc/xxv/files/xxv.utf8-v4:restart() {
/var/portage/www-servers/thin/files/thin.initd:restart() {
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-06-27 00:56:57 UTC
This looks like it ought to be a tracker bug for all the bug reports you will want to assign to maintainers of individual packages.

Or did you really want this bug to be about net-firewall/shorewall only?
Comment 2 Natanael Copa 2012-06-27 19:41:04 UTC
(In reply to comment #1)
> This looks like it ought to be a tracker bug for all the bug reports you
> will want to assign to maintainers of individual packages.
> 

Depends if it can be considered to be a bug in openrc or not.

I don't use gentoo so I don't really care. Its just a heads-up that those scripts most likely does not do whats expected.

I'll leave it to gentoo devs to deal with it.

> Or did you really want this bug to be about net-firewall/shorewall only?

not really.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2012-07-03 10:30:31 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > This looks like it ought to be a tracker bug for all the bug reports you
> > will want to assign to maintainers of individual packages.
> > 
> 
> Depends if it can be considered to be a bug in openrc or not.
> 
> I don't use gentoo so I don't really care. Its just a heads-up that those
> scripts most likely does not do whats expected.

You can't just file half-bugreport's and leave it to that...
Comment 4 William Hubbs gentoo-dev 2012-07-03 19:33:24 UTC
This is not really an openrc issue.

It is documented that init scripts should not have a restart function.

I'll find a link and add it to the bug
Comment 5 William Hubbs gentoo-dev 2012-07-03 20:07:30 UTC
Here is the link in our handbook on this issue [1].
restart() is an artifact from the baselayout-1 days and should be fixed,
but it isn't an openrc issue.

[1] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4#doc_chap4
Comment 6 Natanael Copa 2012-07-05 07:19:37 UTC
(In reply to comment #5)
> Here is the link in our handbook on this issue [1].
> restart() is an artifact from the baselayout-1 days and should be fixed,
> but it isn't an openrc issue.
> 
> [1]
> http://www.gentoo.org/doc/en/handbook/handbook-x86.
> xml?part=2&chap=4#doc_chap4

Thats what i thought. At least you know there are a bunch of scripts that not yet have been adapted and that might bite the users sooner or later. Someone should (In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > This looks like it ought to be a tracker bug for all the bug reports you
> > > will want to assign to maintainers of individual packages.
> > > 
> > 
> > Depends if it can be considered to be a bug in openrc or not.
> > 
> > I don't use gentoo so I don't really care. Its just a heads-up that those
> > scripts most likely does not do whats expected.
> 
> You can't just file half-bugreport's and leave it to that...

Sorry. I'll not file anything at all next time if you feel thats more appropriate.

Feel free to close it.
Comment 7 William Hubbs gentoo-dev 2012-08-24 21:02:06 UTC
No, filing bugs is fine, but I think in this case that individual bugs
should have been filed against each package.

Thanks,

William