public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Adding dependencies in init scripts
@ 2010-02-11  9:55 Damian
  2010-02-11 10:21 ` Dale
  0 siblings, 1 reply; 20+ messages in thread
From: Damian @ 2010-02-11  9:55 UTC (permalink / raw
  To: gentoo-user

Hello,

I would like to configure my system so that every time I start mpd
(via /etc/init.d/mpd)  mpdscrible is started as well. What is the best
way to achieve this?

Thanks in advance,
Damian.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-11  9:55 Damian
@ 2010-02-11 10:21 ` Dale
  2010-02-11 12:15   ` Damian
  0 siblings, 1 reply; 20+ messages in thread
From: Dale @ 2010-02-11 10:21 UTC (permalink / raw
  To: gentoo-user

chrome://messenger/locale/messengercompose/composeMsgs.properties:
> Hello,
>
> I would like to configure my system so that every time I start mpd
> (via /etc/init.d/mpd)  mpdscrible is started as well. What is the best
> way to achieve this?
>
> Thanks in advance,
> Damian.
>
>
>    

I found this by looking in the cups init script.  It should help.

depend() {
     use net
     need avahi-daemon dbus
     before nfs
     after logger
}

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-11 10:21 ` Dale
@ 2010-02-11 12:15   ` Damian
  2010-02-11 12:39     ` Dale
  2010-02-11 17:00     ` Neil Bothwick
  0 siblings, 2 replies; 20+ messages in thread
From: Damian @ 2010-02-11 12:15 UTC (permalink / raw
  To: gentoo-user

On Thu, Feb 11, 2010 at 11:21 AM, Dale <rdalek1967@gmail.com> wrote:
> chrome://messenger/locale/messengercompose/composeMsgs.properties:
>>
>> Hello,
>>
>> I would like to configure my system so that every time I start mpd
>> (via /etc/init.d/mpd)  mpdscrible is started as well. What is the best
>> way to achieve this?
>>
>> Thanks in advance,
>> Damian.
>>
>>
>>
>
> I found this by looking in the cups init script.  It should help.
>
> depend() {
>    use net
>    need avahi-daemon dbus
>    before nfs
>    after logger
> }
Thanks Dale.

I've tried putting "after mpdscribble"  without success. Also the
problem with this approach is that if I update mpd, I will have to
modify the init script again.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-11 12:15   ` Damian
@ 2010-02-11 12:39     ` Dale
  2010-02-11 17:00     ` Neil Bothwick
  1 sibling, 0 replies; 20+ messages in thread
From: Dale @ 2010-02-11 12:39 UTC (permalink / raw
  To: gentoo-user

chrome://messenger/locale/messengercompose/composeMsgs.properties:
> On Thu, Feb 11, 2010 at 11:21 AM, Dale<rdalek1967@gmail.com>  wrote:
>    
>> chrome://messenger/locale/messengercompose/composeMsgs.properties:
>>      
>>> Hello,
>>>
>>> I would like to configure my system so that every time I start mpd
>>> (via /etc/init.d/mpd)  mpdscrible is started as well. What is the best
>>> way to achieve this?
>>>
>>> Thanks in advance,
>>> Damian.
>>>
>>>
>>>
>>>        
>> I found this by looking in the cups init script.  It should help.
>>
>> depend() {
>>     use net
>>     need avahi-daemon dbus
>>     before nfs
>>     after logger
>> }
>>      
> Thanks Dale.
>
> I've tried putting "after mpdscribble"  without success. Also the
> problem with this approach is that if I update mpd, I will have to
> modify the init script again.
>
>
>    

It will likely overwrite your changes but I have no other ideas on how 
to do this.  I would imagine that the script is the only thing that can 
do it since it is what starts/stops the service.

Maybe someone else will have a idea.

Dale

:-)  :-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-11 12:15   ` Damian
  2010-02-11 12:39     ` Dale
@ 2010-02-11 17:00     ` Neil Bothwick
  1 sibling, 0 replies; 20+ messages in thread
From: Neil Bothwick @ 2010-02-11 17:00 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

On Thu, 11 Feb 2010 13:15:04 +0100, Damian wrote:

> > I found this by looking in the cups init script.  It should help.
> >
> > depend() {
> >    use net
> >    need avahi-daemon dbus
> >    before nfs
> >    after logger
> > }  

> I've tried putting "after mpdscribble"  without success. Also the
> problem with this approach is that if I update mpd, I will have to
> modify the init script again.

That only means that is mdscribble is in the runlevel, start mpd after
it. Try "need mpdscribble". The handbook and one of the man pages explain
these options.

You can add /etc/init.d to CONFIG_PROTECT and remove it from
CONFIG_PROTECT_MASK in make.conf.

Or you could remove mpd from the default runlevel and call both the init
scripts from /etc/conf.d/local.


-- 
Neil Bothwick

You are a completely unique individual, just like everybody else.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
@ 2010-02-11 21:22 heini
  2010-02-11 22:35 ` Neil Bothwick
  2010-02-14  1:25 ` Damian
  0 siblings, 2 replies; 20+ messages in thread
From: heini @ 2010-02-11 21:22 UTC (permalink / raw
  To: gentoo-user

Am Donnerstag 11 Februar 2010 18:00:09 schrieb Neil Bothwick:
> On Thu, 11 Feb 2010 13:15:04 +0100, Damian wrote:
> > > I found this by looking in the cups init script.  It should help.
> > > 
> > > depend() {
> > >    use net
> > >    need avahi-daemon dbus
> > >    before nfs
> > >    after logger
> > > }
> > 
> > I've tried putting "after mpdscribble"  without success. Also the
> > problem with this approach is that if I update mpd, I will have to
> > modify the init script again.
> 
> That only means that is mdscribble is in the runlevel, start mpd after
> it. Try "need mpdscribble". The handbook and one of the man pages explain
> these options.
> 
> You can add /etc/init.d to CONFIG_PROTECT and remove it from
> CONFIG_PROTECT_MASK in make.conf.
> 
> Or you could remove mpd from the default runlevel and call both the init
> scripts from /etc/conf.d/local.

Nope. Lookup /etc/rc.conf:

##############################################################################
# SERVICE CONFIGURATION VARIABLES
# These variables are documented here, but should be configured in
# /etc/conf.d/foo for service foo and NOT enabled here unless you
# really want them to work on a global basis.

# Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19"

# Pass ulimit parameters 
#rc_ulimit="-u 30"

# It's possible to define extra dependencies for services like so
#rc_config="/etc/foo"
#rc_need="openvpn"
#rc_use="net.eth0"
#rc_after="clock"
#rc_before="local"
#rc_provide="!net"

# You can also enable the above commands here for each service. Below is an
# example for service foo.
#rc_foo_config="/etc/foo"
#rc_foo_need="openvpn"
#rc_foo_after="clock"

# You can also remove dependencies.
# This is mainly used for saying which servies do NOT provide net.
#rc_net_tap0_provide="!net"

HTH...

	Dirk



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-11 21:22 [gentoo-user] Adding dependencies in init scripts heini
@ 2010-02-11 22:35 ` Neil Bothwick
  2010-02-14  1:25 ` Damian
  1 sibling, 0 replies; 20+ messages in thread
From: Neil Bothwick @ 2010-02-11 22:35 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]

On Thu, 11 Feb 2010 22:22:50 +0100, heini wrote:

> > Or you could remove mpd from the default runlevel and call both the
> > init scripts from /etc/conf.d/local.  
> 
> Nope. Lookup /etc/rc.conf:

I'd forgotten all about that, nice one!


-- 
Neil Bothwick

First Law of Laboratory Work:
Hot glass looks exactly the same as cold glass.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-11 21:22 [gentoo-user] Adding dependencies in init scripts heini
  2010-02-11 22:35 ` Neil Bothwick
@ 2010-02-14  1:25 ` Damian
  2010-02-14  1:51   ` Damian
  1 sibling, 1 reply; 20+ messages in thread
From: Damian @ 2010-02-14  1:25 UTC (permalink / raw
  To: gentoo-user

> HTH...
>
>        Dirk
Thanks a lot for your responses. That looks just like what I needed.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14  1:25 ` Damian
@ 2010-02-14  1:51   ` Damian
  2010-02-14  9:07     ` Dirk Heinrichs
  0 siblings, 1 reply; 20+ messages in thread
From: Damian @ 2010-02-14  1:51 UTC (permalink / raw
  To: gentoo-user

On Sun, Feb 14, 2010 at 2:25 AM, Damian <damian.only@gmail.com> wrote:
>> HTH...
>>
>>        Dirk
> Thanks a lot for your responses. That looks just like what I needed.
>
Ok, I just cannot make this work.

I've created a file  /etc/conf.d/mpd with the following line
rc_after="mpdscrible"

But the init script seems to ignore it. No matter what I put in
/etc/conf.d/mpd . The gentoo handbook doesn't say anything about it.
I'm clearly missing something, but I don't know what it is.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14  1:51   ` Damian
@ 2010-02-14  9:07     ` Dirk Heinrichs
  2010-02-14 11:56       ` Damian
  0 siblings, 1 reply; 20+ messages in thread
From: Dirk Heinrichs @ 2010-02-14  9:07 UTC (permalink / raw
  To: gentoo-user

Am Sonntag 14 Februar 2010 02:51:57 schrieb Damian:
> On Sun, Feb 14, 2010 at 2:25 AM, Damian <damian.only@gmail.com> wrote:
> >> HTH...
> >> 
> >>        Dirk
> > 
> > Thanks a lot for your responses. That looks just like what I needed.
> 
> Ok, I just cannot make this work.
> 
> I've created a file  /etc/conf.d/mpd with the following line
> rc_after="mpdscrible"
> 
> But the init script seems to ignore it. No matter what I put in
> /etc/conf.d/mpd . The gentoo handbook doesn't say anything about it.
> I'm clearly missing something, but I don't know what it is.

In your first post you stated that you want to have both started, right? But 
"after" is about order, not dependency. I'd say you need to put

rc_need="mpd"

into /etc/conf.d/mpdscrible and put mpdscrible into default runlevel, not mpd.

Maybe a combination of both

rc_after="mpdscrible"
rc_need="mpdscrible"

in /etc/conf.d/mpd could also work.

HTH...

	Dirk



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14  9:07     ` Dirk Heinrichs
@ 2010-02-14 11:56       ` Damian
  2010-02-14 14:06         ` Willie Wong
                           ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Damian @ 2010-02-14 11:56 UTC (permalink / raw
  To: gentoo-user

Hi Dirk,

> In your first post you stated that you want to have both started, right? But
> "after" is about order, not dependency. I'd say you need to put
>
> rc_need="mpd"
>
> into /etc/conf.d/mpdscrible and put mpdscrible into default runlevel, not mpd.
I understand, but that isn't what I want, because when I boot up, I
don't always start up mpd.

>
> Maybe a combination of both
>
> rc_after="mpdscrible"
> rc_need="mpdscrible"
>
> in /etc/conf.d/mpd could also work.
That's the problem. No matter what I put in  /etc/conf.d/mpd the init
script seems to ignore it. Even if I write
    rc_need="more money"
it will be ignored. Although the config file is read when I restart mpd.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 11:56       ` Damian
@ 2010-02-14 14:06         ` Willie Wong
  2010-02-14 14:54           ` Damian
  2010-02-14 15:48         ` Stroller
  2010-02-14 16:56         ` Dirk Heinrichs
  2 siblings, 1 reply; 20+ messages in thread
From: Willie Wong @ 2010-02-14 14:06 UTC (permalink / raw
  To: gentoo-user

Damian:

On Sun, Feb 14, 2010 at 12:56:14PM +0100, Damian wrote:
> I understand, but that isn't what I want, because when I boot up, I
> don't always start up mpd.
>
> > Maybe a combination of both
> >
> > rc_after="mpdscrible"
> > rc_need="mpdscrible"
> >
> > in /etc/conf.d/mpd could also work.
> That's the problem. No matter what I put in  /etc/conf.d/mpd the init
> script seems to ignore it. Even if I write
>     rc_need="more money"
> it will be ignored. Although the config file is read when I restart mpd.

I am getting rather confused by this back and forth (I thought I
understood what you wanted and Dirk and other's answers should be
right, but now I am not so sure). Can you answer the following for me
just to make sure we are on the same page?

(a) What is mpdscribble? My understanding is that it is a service that
tells other things what is currently playing on mpd? That it is
actually a client of mpd? Is it actually a daemon/service?

(b) What actually is the desired behaviour? From the last e-mail I am
under the impression you don't always want to have the mpd daemon
running, but you want to be able to bring up /etc/init.d/mpd and
automatically have mpdscribble started? Can you give me a description
of what commands you want to execute and what you want to accomplish
with those?

(c) I noticed that in your previous e-mail you spelled it mpdscrible
with only one b. Is that a typo in the e-mail, or is it actually how
you have it in /etc/conf.d/mpd? emerge --search suggests that
mpdscribble is spelled with two b's.

(d) What versions of openrc and baselayout are you using?

Cheers, 

W

-- 
Willie W. Wong                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 14:06         ` Willie Wong
@ 2010-02-14 14:54           ` Damian
  2010-02-14 16:02             ` Willie Wong
  2010-02-14 20:08             ` Marc Joliet
  0 siblings, 2 replies; 20+ messages in thread
From: Damian @ 2010-02-14 14:54 UTC (permalink / raw
  To: gentoo-user

> I am getting rather confused by this back and forth (I thought I
> understood what you wanted and Dirk and other's answers should be
> right, but now I am not so sure). Can you answer the following for me
> just to make sure we are on the same page?
Sure, I'm sorry for the confusion.

> (a) What is mpdscribble? My understanding is that it is a service that
> tells other things what is currently playing on mpd? That it is
> actually a client of mpd? Is it actually a daemon/service?
In short, mpdscribble is a daemon that submits the tracks you play
(using mpd) to sites such as libre.fm. In that sense it is a client of
mpd. It is possible to start mpdscribble by using
    /etc/init.d/mpdscribble start

> (b) What actually is the desired behaviour? From the last e-mail I am
> under the impression you don't always want to have the mpd daemon
> running, but you want to be able to bring up /etc/init.d/mpd and
> automatically have mpdscribble started? Can you give me a description
> of what commands you want to execute and what you want to accomplish
> with those?
Yes, that's exactly what I want. If I start mpd using the command
    /etc/init.d/mpd start

I would like mpdscribble to be automatically started. What I have as
output instead:
    $ /etc/init.d/mpd stop && /etc/init.d/mpd start &&
/etc/init.d/mpdscribble status
    * Caching service dependencies ...
    *  Service 'syslog-ng' already provides 'logger'!;
    *  Not adding service 'metalog'...
                       [ ok ]
    * Service mpd stopping
    * Service mpd stopped
    * Service mpd starting
    * Service mpd started
    * status:  stopped


> (c) I noticed that in your previous e-mail you spelled it mpdscrible
> with only one b. Is that a typo in the e-mail, or is it actually how
> you have it in /etc/conf.d/mpd? emerge --search suggests that
> mpdscribble is spelled with two b's.
That's right, it is a typo in my previous mail. The config file has no typo.

> (d) What versions of openrc and baselayout are you using?
openrc is not installed, and the baselayout version is 1.12.13.

Thanks,
Damian.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 11:56       ` Damian
  2010-02-14 14:06         ` Willie Wong
@ 2010-02-14 15:48         ` Stroller
  2010-02-14 17:00           ` Dirk Heinrichs
  2010-02-14 16:56         ` Dirk Heinrichs
  2 siblings, 1 reply; 20+ messages in thread
From: Stroller @ 2010-02-14 15:48 UTC (permalink / raw
  To: gentoo-user


On 14 Feb 2010, at 11:56, Damian wrote:
> Hi Dirk,
>
>> In your first post you stated that you want to have both started,  
>> right? But
>> "after" is about order, not dependency. I'd say you need to put
>>
>> rc_need="mpd"
>>
>> into /etc/conf.d/mpdscrible and put mpdscrible into default  
>> runlevel, not mpd.
> I understand, but that isn't what I want, because when I boot up, I
> don't always start up mpd.

So don't put either of them into the default runlevel. The point is to  
get one of them to start when the other does.

>> Maybe a combination of both
>>
>> rc_after="mpdscrible"
>> rc_need="mpdscrible"
>>
>> in /etc/conf.d/mpd could also work.
> That's the problem. No matter what I put in  /etc/conf.d/mpd the init
> script seems to ignore it. Even if I write
>    rc_need="more money"
> it will be ignored. Although the config file is read when I restart  
> mpd.

Is it possible that you & Dirk are using different versions of  
baselayout?

$ grep rc_need /etc/init.d/*
$ grep rc_need /etc/conf.d/*
$ eix -I baselayout
[I] sys-apps/baselayout
      Available versions:  [P]1.11.15-r3 1.12.11.1 ~1.12.12 1.12.13  
~2.0.0 ~2.0.1 {bootstrap build static unicode}
      Installed versions:  1.12.13(03:11:46 09/02/10)(unicode - 
bootstrap -build -static)
      Homepage:            http://www.gentoo.org/
      Description:         Filesystem baselayout and init scripts

$

Stroller.




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 14:54           ` Damian
@ 2010-02-14 16:02             ` Willie Wong
  2010-02-14 20:08             ` Marc Joliet
  1 sibling, 0 replies; 20+ messages in thread
From: Willie Wong @ 2010-02-14 16:02 UTC (permalink / raw
  To: gentoo-user

On Sun, Feb 14, 2010 at 03:54:10PM +0100, Damian wrote:
> > (d) What versions of openrc and baselayout are you using?
> openrc is not installed, and the baselayout version is 1.12.13.

I am thinking that Dirk's advice maybe OpenRC/baselayout2 specific.
Which is perhaps why those configuration variables gets ignored in
your case. 

One thing you can try is to upgrade. But be sure to follow
http://www.gentoo.org/doc/en/openrc-migration.xml
if you choose to do so. If you leave the system in an inconsistent
state it will fail to boot. 

(Unfortunately, as far as I know, openrc is not terribly well
documented besides the information in /etc/rc.conf ... I'd be happy to
be shown otherwise.)

For baselayout-1, I think you are more or less stuck with
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4

Cheers, 

W
-- 
Willie W. Wong                                     wwong@math.princeton.edu
Data aequatione quotcunque fluentes quantitae involvente fluxiones invenire 
         et vice versa   ~~~  I. Newton



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 11:56       ` Damian
  2010-02-14 14:06         ` Willie Wong
  2010-02-14 15:48         ` Stroller
@ 2010-02-14 16:56         ` Dirk Heinrichs
  2 siblings, 0 replies; 20+ messages in thread
From: Dirk Heinrichs @ 2010-02-14 16:56 UTC (permalink / raw
  To: gentoo-user

Am Sonntag 14 Februar 2010 12:56:14 schrieb Damian:

> > into /etc/conf.d/mpdscrible and put mpdscrible into default runlevel, not
> > mpd.
> 
> I understand, but that isn't what I want, because when I boot up, I
> don't always start up mpd.

Well, then don't put it in any runlevel, but if you start the service, you 
should rather start mpdscrible instead of mpd. The latter should then be 
started automatically because of "rc_need".

Bye...

	Dirk



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 15:48         ` Stroller
@ 2010-02-14 17:00           ` Dirk Heinrichs
  2010-02-14 18:46             ` Damian
  0 siblings, 1 reply; 20+ messages in thread
From: Dirk Heinrichs @ 2010-02-14 17:00 UTC (permalink / raw
  To: gentoo-user

Am Sonntag 14 Februar 2010 16:48:00 schrieb Stroller:

> Is it possible that you & Dirk are using different versions of  
> baselayout?

Yes, I am running OpenRC/BL2. I didn't even think for a second that somebody 
could still be using BL1, sorry for that ;)

Bye...

	Dirk



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 17:00           ` Dirk Heinrichs
@ 2010-02-14 18:46             ` Damian
  2010-03-07  9:10               ` Damian
  0 siblings, 1 reply; 20+ messages in thread
From: Damian @ 2010-02-14 18:46 UTC (permalink / raw
  To: gentoo-user

On Sun, Feb 14, 2010 at 6:00 PM, Dirk Heinrichs
<dirk.heinrichs@online.de> wrote:
> Am Sonntag 14 Februar 2010 16:48:00 schrieb Stroller:
>
>> Is it possible that you & Dirk are using different versions of
>> baselayout?
>
> Yes, I am running OpenRC/BL2. I didn't even think for a second that somebody
> could still be using BL1, sorry for that ;)
Ok, I just thought that there might be an easy way in (my loved)
gentoo to start daemon/service X whenever Y is started.

So I'll try upgrading to baselayout 2, and I'll see what happens.

Thanks,
Damian.



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 14:54           ` Damian
  2010-02-14 16:02             ` Willie Wong
@ 2010-02-14 20:08             ` Marc Joliet
  1 sibling, 0 replies; 20+ messages in thread
From: Marc Joliet @ 2010-02-14 20:08 UTC (permalink / raw
  To: Gentoo-User ML

[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]

Am Sun, 14 Feb 2010 15:54:10 +0100
schrieb Damian <damian.only@gmail.com>:

> > (d) What versions of openrc and baselayout are you using?
> openrc is not installed, and the baselayout version is 1.12.13.

As Willie Wong mentioned, that ought to explain it. The features Dirk was
referring to are AFAIK only available in OpenRC/Baselayout-2.

In addition to the previous advice, another thing you could try is modify the
mpdscribble init script and add it (not the entire /etc/init.d/ directory [0])
to CONFIG_PROTECT in make.conf, similarly to what Neil suggested. Then you
should only be bothered by mpdscribble updates, and not by *any* update
in /etc/init.d/. Of course this is up to you.

Perhaps there is a better way to accomplish what you want with baselayout-1,
but I can't think of any right now.

> Thanks,
> Damian.

[0] According to make.conf(5), CONFIG_PROTECT and CONFIG_PROTECT_MASK may
    contain individual files in addition to whole directories.

HTH
-- 
Marc Joliet
--
Lt. Frank Drebin: "It's true what they say: cops and women don't mix. Like
eating a spoonful of Drāno; sure, it'll clean you out, but it'll leave you
hollow inside."

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [gentoo-user] Adding dependencies in init scripts
  2010-02-14 18:46             ` Damian
@ 2010-03-07  9:10               ` Damian
  0 siblings, 0 replies; 20+ messages in thread
From: Damian @ 2010-03-07  9:10 UTC (permalink / raw
  To: gentoo-user

On Sun, Feb 14, 2010 at 7:46 PM, Damian <damian.only@gmail.com> wrote:
> On Sun, Feb 14, 2010 at 6:00 PM, Dirk Heinrichs
> <dirk.heinrichs@online.de> wrote:
>> Am Sonntag 14 Februar 2010 16:48:00 schrieb Stroller:
>>
>>> Is it possible that you & Dirk are using different versions of
>>> baselayout?
>>
>> Yes, I am running OpenRC/BL2. I didn't even think for a second that somebody
>> could still be using BL1, sorry for that ;)
> Ok, I just thought that there might be an easy way in (my loved)
> gentoo to start daemon/service X whenever Y is started.
>
> So I'll try upgrading to baselayout 2, and I'll see what happens.
A*fter a long time I've found some free time to migrate to baselayout 2.

After upgrading and reading through
http://www.gentoo.org/doc/en/openrc-migration.xml, I created a file
named '/etc/conf.d/mpd' and I added the line:
    rc_need="mpdscribble"
as described in '/etc/rc.conf'.

And that was it! Now mpdscribble gets started whenever I start mpd
(and this way all the Britney Spears songs I play will be sent to
libre.fm, weee!).

Thanks a lot for your help.



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2010-03-07  9:10 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 21:22 [gentoo-user] Adding dependencies in init scripts heini
2010-02-11 22:35 ` Neil Bothwick
2010-02-14  1:25 ` Damian
2010-02-14  1:51   ` Damian
2010-02-14  9:07     ` Dirk Heinrichs
2010-02-14 11:56       ` Damian
2010-02-14 14:06         ` Willie Wong
2010-02-14 14:54           ` Damian
2010-02-14 16:02             ` Willie Wong
2010-02-14 20:08             ` Marc Joliet
2010-02-14 15:48         ` Stroller
2010-02-14 17:00           ` Dirk Heinrichs
2010-02-14 18:46             ` Damian
2010-03-07  9:10               ` Damian
2010-02-14 16:56         ` Dirk Heinrichs
  -- strict thread matches above, loose matches on Subject: below --
2010-02-11  9:55 Damian
2010-02-11 10:21 ` Dale
2010-02-11 12:15   ` Damian
2010-02-11 12:39     ` Dale
2010-02-11 17:00     ` Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox