From owner-freebsd-questions Fri Mar 30 13: 6:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by hub.freebsd.org (Postfix) with ESMTP id 8F6B837B71B for ; Fri, 30 Mar 2001 13:06:16 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Fri, 30 Mar 2001 22:06:04 +0100 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 14j64x-0007iF-00; Fri, 30 Mar 2001 22:05:07 +0100 Date: Fri, 30 Mar 2001 22:05:07 +0100 (BST) From: Jan Grant To: "G. Jason Middleton" Cc: freebsd-questions Subject: Re: ok friends...starting shlight at bootime In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 30 Mar 2001, G. Jason Middleton wrote: > do i really need to know how to program a script file just to get > "shlight" (a program that mounts NT shares) to run at boot time? I placed > a file with the following in my rc.d directory (file name is shlight.sh) > > #!/bin/sh > > > /usr/local/sbin/shlight //lewscious/uploads /var/ftp/incoming -U jason -P > bangkok > > /usr/local/sbin/shlight //lewscious/mp3 /var/ftp/pub -U jason -P bangkok > > /usr/local/sbin/shlight //lewscious/30gig /home/jason/30gig -U jason -P > bangkok > > > this does not seem to be working because i a still having to start shlight > manually. > > Any ideas? Is it executable? chmod +x /etc/rc.d/shlight.sh jan PS. although in this case it won't hurt, there's a move to write /etc/rc.d scripts that understand the parameters "start" and "stop", so trivially you might want: #!/bin/sh case "$1" in 'start') /usr/local/sbin/shlight etc. ;; 'stop') # Trivial (you may be able to produce something less # hamfisted than this) stop script: /usr/bin/killall shlight ;; *) echo "Usage: $0 { start | stop }" exit 1 ;; esac exit 0 -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287163 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk ioctl(2): probably the coolest Unix system call in the world To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message