Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 294471 - sys-apps/openrc-0.5.2-r2: rc.conf extra dependencies don't understand service names with hyphens (-s)
Summary: sys-apps/openrc-0.5.2-r2: rc.conf extra dependencies don't understand service...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-24 19:33 UTC by Dan Goodliffe
Modified: 2010-02-21 13:40 UTC (History)
2 users (show)

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 Dan Goodliffe 2009-11-24 19:33:30 UTC
I've tried to add netmount as a dependency of courier-imapd as a keep /home on a glusterfs mount. I added the following line to /etc/rc.conf
rc_courier-imapd_need="netmount"

Reproducible: Always

Steps to Reproduce:
1. Add rc_courier-imapd_need="netmount" to /etc/rc.conf
2. /etc/init.d/netmount restart

Actual Results:  
firebrand ~ # /etc/init.d/netmount restart
* Caching service dependencies...
/etc/rc.conf: line 107: rc_courier-imapd_need=netmount: command not found
< repeated many many times >
/etc/rc.conf: line 107: rc_courier-imapd_need=netmount: command not found
Service `xdm' needs non existant service `hald'                                                                                     [ ok ]
mythbackend      |/etc/rc.conf: line 107: rc_courier-imapd_need=netmount: command not found                                               
mythbackend      |* Stopping MythTV Backend...                                                                                      [ ok ]
netmount         |/etc/rc.conf: line 107: rc_courier-imapd_need=netmount: command not found                                               
netmount         |* Unmounting network filesystems...                                                                               [ ok ]
netmount         |/etc/rc.conf: line 107: rc_courier-imapd_need=netmount: command not found                                               
netmount         |* Mounting network filesystems...                                                                                 [ ok ]
firebrand ~ # mythbackend      |/etc/rc.conf: line 107: rc_courier-imapd_need=netmount: command not found
mythbackend      |* Starting MythTV Backend...                                                                                      [ ok ]

Expected Results:  
Courier IMAPD ad MythTV Backend should both be stopped, netmount restarted, and then both services restarted

The above example is the output when rc.conf also includes
rc_mythbackend_need="netmount"

This on its own works as expected.

The simple work around is to add the dependencies to the appropriate /etc/init.d/script
Comment 1 Roy Marples 2009-11-25 02:03:55 UTC
Replace any non shell var chars with _
I thought this was documented ...
Comment 2 Dan Goodliffe 2009-11-25 09:44:36 UTC
I did try that... but that didn't restart the service.
I'll try it again and make sure nothing else was confusing the matter.
Comment 3 Dan Goodliffe 2009-11-25 19:22:37 UTC
rc_courier_imapd_need="netmount"

firebrand ~ # /etc/init.d/netmount restart
netmount         |* Caching service dependencies...
Service `xdm' needs non existant service `hald'                                                                                     [ ok ]
mythbackend      |* Stopping MythTV Backend...                                                                                      [ ok ]
netmount         |* Unmounting network filesystems...                                                                               [ ok ]
netmount         |* Mounting network filesystems...                                                                                 [ ok ]
firebrand ~ # mythbackend      |* Starting MythTV Backend...                                                                        [ ok ]

mythbackend has netmount in it's init.d script.
courier-imapd is not restarted.
Comment 5 Trevor Summers Smith 2010-02-21 11:52:15 UTC
Also please note that this bug did _not_ have anything to do with hyphens in the service names. The problem was that OpenRC did not include dependencies from /etc/rc.conf. I have tested the fix and I see dependencies from /etc/rc.conf being correctly loaded. 

Brief mailing list discussion starting here: http://roy.marples.name/archives/openrc-discuss/2010/0079.html 

Thanks Roy.
Comment 6 Dan Goodliffe 2010-02-21 13:08:26 UTC
I have to admit, I'd have put money on that it was. But now doesn't appear to be the same as I remember. I'm currently running 0.6.0-r1.
Comment 7 Trevor Summers Smith 2010-02-21 13:13:28 UTC
Sorry, I didn't write my post up well. I meant that as long as one replaced non shell char vars with underscores, as per documentation, there is no problem.


(In reply to comment #6)
> I have to admit, I'd have put money on that it was. But now doesn't appear to
> be the same as I remember. I'm currently running 0.6.0-r1.
> 

Comment 8 William Hubbs gentoo-dev 2010-02-21 13:40:27 UTC
This is fixed upstream.