diff options
author | Elrond <elrond@samba.org> | 2000-04-03 16:12:55 +0000 |
---|---|---|
committer | Elrond <elrond@samba.org> | 2000-04-03 16:12:55 +0000 |
commit | 708aa09e0f620883a809a4d44167032c71d6b2a8 (patch) | |
tree | 26644bef107715561153e9c4d0dfd66f41007ca4 | |
parent | 30101abc18ed7faac694eba67f241a1b416bb7c9 (diff) | |
download | samba-708aa09e0f620883a809a4d44167032c71d6b2a8.tar.gz |
*arg*
My last commit stopped after 3 files:
I haven't got enough permissions in
/data/cvs/samba/include/Attic/.
So I at least commit this part, so the whole thing still
works.
Can someone please fix that?
Elrond
-rw-r--r-- | source/script/.cvsignore | 2 | ||||
-rwxr-xr-x | source/script/mkproto.sh | 37 | ||||
-rw-r--r-- | source/script/samba-init.d.in | 60 |
3 files changed, 98 insertions, 1 deletions
diff --git a/source/script/.cvsignore b/source/script/.cvsignore index 32b746b8230..830dd332374 100644 --- a/source/script/.cvsignore +++ b/source/script/.cvsignore @@ -1,2 +1,2 @@ .libs - +samba-init.d diff --git a/source/script/mkproto.sh b/source/script/mkproto.sh new file mode 100755 index 00000000000..ed359d34467 --- /dev/null +++ b/source/script/mkproto.sh @@ -0,0 +1,37 @@ +#! /bin/sh + +if [ $# -lt 3 ] +then + echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" + exit 1 +fi + +awk="$1" +shift + +if [ x"$1" = x-h ] +then + headeropt="-v headername=$2" + shift; shift; +else + headeropt="" +fi + +header="$1" +shift +headertmp="$header.$$.tmp~" + +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" + +echo creating $header + +${awk} $headeropt \ + -f script/mkproto.awk $proto_src > $headertmp + +if cmp -s $header $headertmp 2>/dev/null +then + echo "$header unchanged" + rm $headertmp +else + mv $headertmp $header +fi diff --git a/source/script/samba-init.d.in b/source/script/samba-init.d.in new file mode 100644 index 00000000000..dd2c184f9bb --- /dev/null +++ b/source/script/samba-init.d.in @@ -0,0 +1,60 @@ +#! /bin/sh +# +# Start/stop script for Samba TNG +# +# This is from a Solaris box. Proper links need to be made to it from the +# rcX.d directories. For Linux, it goes into /etc/rc.d/init.d +# +# Lonnie +# +# Heavily modified and integrated with autoconf by Elrond + +prefix=@prefix@ +exec_prefix=@exec_prefix@ + +bindir=@bindir@ +sbindir=@sbindir@ +VARDIR=@localstatedir@ +lockdir=@lockdir@ + +daemons="smbd nmbd netlogond samrd browserd lsarpcd srvsvcd winregd wkssvcd" +daemons="$daemons spoolssd svcctld" + +cd / +unset TMPDIR + +case "$1" in + 'start') + echo -n "Starting SMB services:" + PATH="${sbindir}:${bindir}:${PATH}" + export PATH + for i in $daemons + do + echo -n " $i" + $i -D + done + echo "." + ;; + 'restart') + $0 stop + $0 start + ;; + 'stop') + echo -n "Stopping SMB services:" + for file in ${lockdir}/*.pid + do + if [ -r $file ] + then + d=`echo $file | sed -e 's,^.*/\(.*\)\.pid$,\1,'` + echo -n " $d" + kill `cat $file` + rm $file + fi + done + echo "." + ;; + *) + echo "Usage: $0 { start | stop | restart }" + ;; +esac +exit 0 |