Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Jan 2010 15:00:11 +0200
From:      Kaya Saman <SamanKaya@netscape.net>
To:        RW <rwmaillists@googlemail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: rc.d script not working for Xmms2 :-(
Message-ID:  <4B472C5B.1050902@netscape.net>
In-Reply-To: <20100108124306.6b607750@gumby.homeunix.com>
References:  <4B4707AC.7050908@netscape.net> <20100108124306.6b607750@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Many thanks for the tips I am almost there but have a problem now!

This is the output I get:

./xmms2launcher stop
./xmms2launcher: WARNING: cannot read shebang line from 
/usr/local/bin/xmms2launcher
xmms2launcher not running?

 From my current file:

rd1# cat xmms2launcher
#!/bin/sh

# PROVIDE:    xmms2launcher

. /etc/rc.subr

name="xmms2launcher"
rcvar=`set_rcvar`
command="/usr/local/bin/${name} -u kaya"

load_rc_config $name
run_rc_command "$1"

Of which I know call xmms2launcher_enable="YES" from within /etc/rc.conf

The only issue is that the command is here:

rd1# ls /usr/local/bin | grep xmms2
nyxmms2
xmms2
xmms2-et
xmms2-find-avahi
xmms2-launcher
xmms2-mdns-avahi
xmms2d

So if I can't add the - does this mean that I have to create a link to 
xmms2-launcher with name xmms2launcher??

--K

RW wrote:
> On Fri, 08 Jan 2010 12:23:40 +0200
> Kaya Saman <SamanKaya@netscape.net> wrote:
>
>
>   
>> So far I have modified the script to look like this:
>>
>> #!/bin/sh
>>     
>
> You may  need a PROVIDE LINE e.g.
> # PROVIDE:    xmms2launcher
>
>
>   
>> . /etc/rc.subr
>>
>> name="xmms2-launcher"
>>     
>
> You can't use "-" in shell variable names, so you shouldn't use it here 
>
>   
>> rcvar=`set_rcvar`
>> command="/usr/local/bin/${name}" -u kaya
>>     
>
> The -u kaya needs to go in a <name>_flags variable
>  
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
>   




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B472C5B.1050902>