From owner-freebsd-questions@FreeBSD.ORG Fri Jan 8 13:00:30 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F1DC1065695 for ; Fri, 8 Jan 2010 13:00:30 +0000 (UTC) (envelope-from samankaya@netscape.net) Received: from imr-db03.mx.aol.com (imr-db03.mx.aol.com [205.188.91.97]) by mx1.freebsd.org (Postfix) with ESMTP id F2C198FC2A for ; Fri, 8 Jan 2010 13:00:29 +0000 (UTC) Received: from imo-da03.mx.aol.com (imo-da03.mx.aol.com [205.188.169.201]) by imr-db03.mx.aol.com (8.14.1/8.14.1) with ESMTP id o08D0KOE013563; Fri, 8 Jan 2010 08:00:20 -0500 Received: from samankaya@netscape.net by imo-da03.mx.aol.com (mail_out_v42.5.) id 4.cb7.63adb67c (55913); Fri, 8 Jan 2010 08:00:15 -0500 (EST) Received: from [172.16.1.2] (mail.reformkurumsal.com [212.156.209.87]) by cia-md06.mx.aol.com (v127.7) with ESMTP id MAILCIAMD068-da694b472c5c13e; Fri, 08 Jan 2010 08:00:15 -0500 Message-ID: <4B472C5B.1050902@netscape.net> Date: Fri, 08 Jan 2010 15:00:11 +0200 From: Kaya Saman User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17 (Ubuntu-1.1.17+nobinonly-0ubuntu0.9.04.1) MIME-Version: 1.0 To: RW References: <4B4707AC.7050908@netscape.net> <20100108124306.6b607750@gumby.homeunix.com> In-Reply-To: <20100108124306.6b607750@gumby.homeunix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AOL-IP: 212.156.209.87 X-Mailer: Unknown (No Version) X-Spam-Flag: NO X-AOL-SENDER: samankaya@netscape.net Cc: freebsd-questions@freebsd.org Subject: Re: rc.d script not working for Xmms2 :-( X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 13:00:30 -0000 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 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 _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" >