Solaris packaging

David Boyce dsb at world.std.com
Mon Oct 25 15:49:44 GMT 1999


At 01:09 AM 10/26/99 +1000, Anand Kumria wrote:
>On Mon, 25 Oct 1999, Andrew Tridgell wrote:
>
> > The Solaris packaging stuff in the 2.0 tree looks totally broken. It
> > can't have every worked and looks like it has been cloned from another
> > platform without it ever being tested.
> >
> > Does anyone want to redo it? If not then I will delete the whole
> > packaging/Solaris/ directory. I'd rather not have stuff that is
> > totally broken in the tree, it just confuses users. Samba does run
> > well on Solaris, but the SysV init scripts and packaging stuff
> > doesn't.
>
>I've just been doing this at work, not Samba but other GNU stuff. I'll
>take a look later today and see if I can roll one up.


In case anyone cares, here's an /etc/init.d/samba script which works fine 
for me. But note that it makes use of new features of Solaris 7 
(pgrep/pkill) which makes it elegant on that platform but unuseable as is 
for earlier versions:

#! /sbin/sh
# Startup script for Solaris 7+/Samba 2+
# David Boyce 8/9/99

# Insurance, because I often restart samba from elsewhere.
cd /

case "$1" in
start)
         echo "Starting Samba ..."
         /usr/local/samba/bin/smbd -D
         /usr/local/samba/bin/nmbd -D
         ;;

stop)
         echo "Stopping Samba ..."
         /usr/bin/pkill '[sn]mbd'
         ;;

restart|reset)
         echo "Restarting Samba ..."
         /usr/bin/pkill '[sn]mbd'
         /usr/local/samba/bin/smbd -D
         /usr/local/samba/bin/nmbd -D
         /usr/bin/pgrep -l '[sn]mbd'
         ;;

*)
         echo "Usage: $0 { start | stop | restart }"
         exit 1
         ;;
esac




More information about the samba-technical mailing list