Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2001 22:05:07 +0100 (BST)
From:      Jan Grant <Jan.Grant@bristol.ac.uk>
To:        "G. Jason Middleton" <gmiddl1@gl.umbc.edu>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: ok friends...starting shlight at bootime
Message-ID:  <Pine.GSO.4.31.0103302200120.28764-100000@mail.ilrt.bris.ac.uk>
In-Reply-To: <Pine.SGI.4.31L.02.0103301544060.1937861-100000@irix2.gl.umbc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.31.0103302200120.28764-100000>