diff options
Diffstat (limited to 'packaging/SGI')
-rw-r--r-- | packaging/SGI/.cvsignore | 8 | ||||
-rw-r--r-- | packaging/SGI/README | 44 | ||||
-rwxr-xr-x | packaging/SGI/findsmb | 141 | ||||
-rwxr-xr-x | packaging/SGI/idb.pl | 272 | ||||
-rwxr-xr-x | packaging/SGI/inetd.sh | 29 | ||||
-rw-r--r-- | packaging/SGI/legal_notice.html | 53 | ||||
-rwxr-xr-x | packaging/SGI/makefile.pl | 38 | ||||
-rwxr-xr-x | packaging/SGI/mkman | 27 | ||||
-rwxr-xr-x | packaging/SGI/mkprintcap.sh | 15 | ||||
-rwxr-xr-x | packaging/SGI/mkrelease.sh | 82 | ||||
-rw-r--r-- | packaging/SGI/printcap | 5 | ||||
-rw-r--r-- | packaging/SGI/relnotes.html | 233 | ||||
-rw-r--r-- | packaging/SGI/samba.config | 1 | ||||
-rw-r--r-- | packaging/SGI/samba.rc | 42 | ||||
-rw-r--r-- | packaging/SGI/sambalp | 150 | ||||
-rw-r--r-- | packaging/SGI/smb.conf | 122 | ||||
-rw-r--r-- | packaging/SGI/smbpasswd | 1 | ||||
-rw-r--r-- | packaging/SGI/smbprint | 54 | ||||
-rwxr-xr-x | packaging/SGI/spec.pl | 87 | ||||
-rwxr-xr-x | packaging/SGI/startswat.sh | 21 |
20 files changed, 1425 insertions, 0 deletions
diff --git a/packaging/SGI/.cvsignore b/packaging/SGI/.cvsignore new file mode 100644 index 00000000000..7b74def5aea --- /dev/null +++ b/packaging/SGI/.cvsignore @@ -0,0 +1,8 @@ +bins +catman +html +codepages +swat +Makefile +samba.idb +samba.spec diff --git a/packaging/SGI/README b/packaging/SGI/README new file mode 100644 index 00000000000..f13164af4a7 --- /dev/null +++ b/packaging/SGI/README @@ -0,0 +1,44 @@ +This directory contains sample files for using Samba on an IRIX +system. These were taken from a system running IRIX 6.2. The +client machines were running Win95 and connected via the Ethernet +using TCP/IP and DNS. Consult the Samba documentation for tips +on configuring Samba "properly"; this smb.conf file is very simple. +Consult the Microsoft help/documentation to understand how to +configure the networking support on the PC clients (Win95, WfW, +etc.). + +This distribution is configured so that various Samba configuration, +binary, and log files are placed in the /usr/samba file hierarchy. +Man pages are placed in the /usr/share/catman/u_man hierarchy. + +The version number of the distribution is a 10 digit number that +is created from the samba version number. Each section of the samba +version number forms 2 digits of the version number (with leading +zeros if necessary). The alpha versions add 00 and 2 digits for +the alpha number. The first release adds 0100. Patch releases add +2 digits for the patch level plus 1 and 00. + +samba version 1.9.18alpha9 would become 0109180009 +samba version 1.9.18 would become 0109180100 +samba version 1.9.18p9 would become 0109181000 + +You can enable all printers on your system to be used by samba +by running the script /usr/samba/mkprintcap.sh + +This distribution automatically configures samba to run as deamons +by the script /etc/init.d/samba and the file /etc/config/samba +(used by chkconfig). If you would prefer to have samba started by +inetd you can run the script /usr/samba/inetd.sh. + +To create a Samba distribution you must have the Documenter's WorkBench +package installed to format the manual pages. In addition you need +to have the Software Packager software (inst_dev) installed to +generate the inst images, and Perl to generate the spec and idb files. + +From /usr/samba/packaging/SGI directory run the mkrelease.sh script. +There is one optional argument which is the major release number of the +OS version (4, 5, or 6) you desire. If no number is specified it defaults +to 6. This script uses Perl to generate the Makefile with the proper +defines and the packaging files samba.spec and samba.idb. The binary +package files will be placed in ./bins + diff --git a/packaging/SGI/findsmb b/packaging/SGI/findsmb new file mode 100755 index 00000000000..c10efbf22a7 --- /dev/null +++ b/packaging/SGI/findsmb @@ -0,0 +1,141 @@ +#!/bin/perl +# +# Prints info on all smb responding machines on a subnet. +# This script needs to be run on a machine without nmbd running and be +# run as root to get correct info from WIN95 clients. +# +# syntax: +# findsmb [subnet broadcast address] +# +# with no agrument it will list machines on the current subnet +# +# There will be a "+" in front of the workgroup name for machines that are +# local master browsers for that workgroup. There will be an "*" in front +# of the workgroup name for machines that are the domain master browser for +# that workgroup. +# + +$SAMBABIN = "/usr/samba/bin"; + +for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address + $_ = shift; + if (m/-d|-D/) { + $DEBUG = 1; + } else { + if ($_) { + $BCAST = "-B $_"; + } + } +} + +sub ipsort # do numeric sort on last field of IP address +{ + @t1 = split(/\./,$a); + @t2 = split(/\./,$b); + @t1[3] <=> @t2[3]; +} + +# look for all machines that respond to a name lookup + +open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || + die("Can't run nmblookup '*'.\n"); + +# get rid of all lines that are not a response IP address, +# strip everything but IP address and sort by last field in address + +@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,<NMBLOOKUP>); + +# print header info + +print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; +print "---------------------------------------------------------------------\n"; + +foreach $ip (@ipaddrs) # loop through each IP address found +{ + $ip =~ s/\n//; # strip newline from IP address + +# find the netbios names registered by each machine + + open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || + die("Can't get nmb name list.\n"); + @nmblookup = <NMBLOOKUP>; + close NMBLOOKUP; + +# get the first <00> name + + @name = grep(/<00>/,@nmblookup); + $_ = @name[0]; + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { + /(\S+)/; + $name = $1; + } + +# do an smbclient command on the netbios name. + + open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || + die("Can't do smbclient command.\n"); + @smb = <SMB>; + close SMB; + + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + print @nmblookup; + print @smb; + } + +# look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/.*Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + +# for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - <GROUP>/,@nmblookup); + $_ = @name[0]; + if ($_) { + /(\S+)/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } + } + +# see if machine registered a local master browser name + if (grep(/<1d>/,@nmblookup)) { + $master = '+'; # indicate local master browser + if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? + $master = '*'; # indicate domain master browser + } + } else { + $master = ' '; # not a browse master + } + +# line up info in 3 columns + + print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; + + } else { # no netbios name found +# try getting the host name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + if ($DEBUG) { # if -d flag print results of nmblookup + print "===============================================================\n"; + print @nmblookup; + } + print "$ip".' 'x(16-length($ip))."$name\n"; + } +} + diff --git a/packaging/SGI/idb.pl b/packaging/SGI/idb.pl new file mode 100755 index 00000000000..4fb0d6bb9a2 --- /dev/null +++ b/packaging/SGI/idb.pl @@ -0,0 +1,272 @@ +#!/usr/bin/perl +require "pwd.pl" || die "Required pwd.pl not found"; + +# This perl script automatically generates the samba.idb file + +&initpwd; +$curdir = $ENV{"PWD"}; + +# We don't want the files listed in .cvsignore in the source tree +open(IGNORES,"../../source/.cvsignore") || die "Unable to open .cvsignore file\n"; +while (<IGNORES>) { + chop; + $ignores{$_}++; +} +close IGNORES; + +# get the names of all the binary files to be installed +open(MAKEFILE,"../../source/Makefile") || die "Unable to open Makefile\n"; +@makefile = <MAKEFILE>; +@sprogs = grep(/^SPROGS /,@makefile); +@progs1 = grep(/^PROGS1 /,@makefile); +@progs2 = grep(/^PROGS2 /,@makefile); +@mprogs = grep(/^MPROGS /,@makefile); +@progs = grep(/^PROGS /,@makefile); +@scripts = grep(/^SCRIPTS /,@makefile); +@codepage = grep(/^CODEPAGELIST/,@makefile); +close MAKEFILE; + +if (@sprogs) { + @sprogs[0] =~ s/^.*\=//; + @sprogs = split(' ',@sprogs[0]); +} +if (@progs) { + @progs[0] =~ s/^.*\=//; + @progs = split(' ',@progs[0]); +} +if (@mprogs) { + @mprogs[0] =~ s/^.*\=//; + @mprogs = split(' ',@mprogs[0]); +} +if (@progs1) { + @progs1[0] =~ s/^.*\=//; + @progs1 = split(' ',@progs1[0]); +} +if (@progs2) { + @progs2[0] =~ s/^.*\=//; + @progs2 = split(' ',@progs2[0]); +} +if (@scripts) { + @scripts[0] =~ s/^.*\=//; + @scripts = split(' ',@scripts[0]); +} +if (@codepage) { + @codepage[0] =~ s/^.*\=//; + chdir '../../source'; + # if we have codepages we need to create them for the package + system("chmod +x ./script/installcp.sh"); + system("./script/installcp.sh . . ../packaging/SGI/codepages ./bin @codepage[0]"); + chdir $curdir; + @codepage = sort split(' ',@codepage[0]); +} +# install the swat files +chdir '../../source'; +system("chmod +x ./script/installswat.sh"); +system("./script/installswat.sh ../packaging/SGI/swat ./"); +system("cp ../swat/README ../packaging/SGI/swat"); +chdir $curdir; + +# add my local files to the list of binaries to install +@bins = sort byfilename (@sprogs,@progs,@progs1,@progs2,@mprogs,@scripts,("/findsmb","/sambalp","/smbprint")); + +# get a complete list of all files in the tree +chdir '../../'; +&dodir('.'); +chdir $curdir; + +# the files installed in docs include all the original files in docs plus all +# the "*.doc" files from the source tree +@docs = sort byfilename grep (!/^docs\/$/ & (/^source\/.*\.doc$/ | /^docs\//),@allfiles); + +@swatfiles = sort grep(/^packaging\/SGI\/swat/, @allfiles); +@catman = sort grep(/^packaging\/SGI\/catman/ & !/\/$/, @allfiles); +@catman = sort bydirnum @catman; + +# strip out all the generated directories and the "*.o" files from the source +# release +@allfiles = grep(!/^.*\.o$/ & !/^packaging\/SGI\/bins/ & !/^packaging\/SGI\/catman/ & !/^packaging\/SGI\/html/ & !/^packaging\/SGI\/codepages/ & !/^packaging\/SGI\/swat/, @allfiles); + +open(IDB,">samba.idb") || die "Unable to open samba.idb for output\n"; + +print IDB "f 0644 root sys etc/config/samba packaging/SGI/samba.config samba.sw.base config(update)\n"; +print IDB "f 0755 root sys etc/init.d/samba packaging/SGI/samba.rc samba.sw.base\n"; +print IDB "l 0000 root sys etc/rc0.d/K39samba packaging/SGI samba.sw.base symval(../init.d/samba)\n"; +print IDB "l 0000 root sys etc/rc2.d/S81samba packaging/SGI samba.sw.base symval(../init.d/samba)\n"; + +@copyfile = grep (/^COPY/,@allfiles); +print IDB "d 0755 root sys usr/relnotes/samba/ packaging/SGI samba.man.relnotes\n"; +print IDB "f 0644 root sys usr/relnotes/samba/@copyfile[0] @copyfile[0] samba.man.relnotes\n"; +print IDB "f 0644 root sys usr/relnotes/samba/legal_notice.html packaging/SGI/legal_notice.html samba.man.relnotes\n"; +print IDB "f 0644 root sys usr/relnotes/samba/samba-relnotes.html packaging/SGI/relnotes.html samba.man.relnotes\n"; + +print IDB "d 0755 root sys usr/samba/ packaging/SGI samba.sw.base\n"; +print IDB "f 0444 root sys usr/samba/README packaging/SGI/README samba.sw.base\n"; + +print IDB "d 0755 root sys usr/samba/bin/ packaging/SGI samba.sw.base\n"; +while(@bins) { + $nextfile = shift @bins; + ($filename = $nextfile) =~ s/^.*\///;; + + if (index($nextfile,'$')) { + if ($filename eq "smbpasswd") { + print IDB "f 0755 root sys usr/samba/bin/$filename source/$nextfile samba.sw.base\n"; + } + elsif ($filename eq "findsmb") { + print IDB "f 0755 root sys usr/samba/bin/$filename packaging/SGI/$filename samba.sw.base\n"; + } + elsif ($filename eq "swat") { + print IDB "f 4755 root sys usr/samba/bin/$filename source/$nextfile samba.sw.base\n"; + } + elsif ($filename eq "sambalp") { + print IDB "f 0755 root sys usr/samba/bin/$filename packaging/SGI/$filename samba.sw.base\n"; + } + elsif ($filename eq "smbprint") { + print IDB "f 0755 root sys usr/samba/bin/$filename packaging/SGI/$filename samba.sw.base\n"; + } + else { + print IDB "f 0755 root sys usr/samba/bin/$filename source/$nextfile samba.sw.base\n"; + } + } +} + +print IDB "d 0755 root sys usr/samba/docs/ docs samba.man.doc\n"; +while (@docs) { + $nextfile = shift @docs; + next if ($nextfile eq "CVS"); + ($junk,$file) = split(/\//,$nextfile,2); + if (grep(/\/$/,$nextfile)) { + print IDB "d 0755 root sys usr/samba/docs/$file $nextfile samba.man.doc\n"; + } + else { + print IDB "f 0644 root sys usr/samba/docs/$file $nextfile samba.man.doc\n"; + } +} + +print IDB "f 0755 root sys usr/samba/inetd.sh packaging/SGI/inetd.sh samba.sw.base\n"; +print IDB "d 0755 root sys usr/samba/lib/ packaging/SGI samba.sw.base\n"; +if (@codepage) { + print IDB "d 0755 root sys usr/samba/lib/codepages packaging/SGI samba.sw.base\n"; + while (@codepage) { + $nextpage = shift @codepage; + print IDB "f 0644 root sys usr/samba/lib/codepages/codepage.$nextpage packaging/SGI/codepages/codepage.$nextpage samba.sw.base\n"; + } +} +print IDB "f 0644 root sys usr/samba/lib/smb.conf packaging/SGI/smb.conf samba.sw.base config(update)\n"; +print IDB "f 0755 root sys usr/samba/mkprintcap.sh packaging/SGI/mkprintcap.sh samba.sw.base\n"; + +print IDB "d 0644 root sys usr/samba/private/ packaging/SGI samba.sw.base\n"; +print IDB "f 0600 root sys usr/samba/private/smbpasswd packaging/SGI/smbpasswd samba.sw.base config(update)\n"; +print IDB "d 0755 root sys usr/samba/src/ packaging/SGI samba.src.samba\n"; +@sorted = sort(@allfiles); +while (@sorted) { + $nextfile = shift @sorted; + ($file = $nextfile) =~ s/^.*\///; + next if grep(/packaging\/SGI/& (/Makefile/ | /samba\.spec/ | /samba\.idb/),$nextfile); + next if grep(/source/,$nextfile) && ($ignores{$file}); + next if ($nextfile eq "CVS"); + if (grep(/\/$/,$nextfile)) { + print IDB "d 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n"; + } + else { + if (grep((/\.sh$/ | /\.pl$/ | /mkman$/),$nextfile)) { + print IDB "f 0755 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n"; + } + else { + print IDB "f 0644 root sys usr/samba/src/$nextfile $nextfile samba.src.samba\n"; + } + } +} + +print IDB "f 0755 root sys usr/samba/startswat.sh packaging/SGI/startswat.sh samba.sw.base\n"; +print IDB "d 0755 root sys usr/samba/swat/ packaging/SGI/swat samba.sw.base\n"; +while (@swatfiles) { + $nextfile = shift @swatfiles; + ($file = $nextfile) =~ s/^packaging\/SGI\/swat\///; + next if !$file; + if (grep(/\/$/,$file)) { + print IDB "d 0755 root sys usr/samba/swat/$file packaging/SGI/swat/$file samba.sw.base\n"; + } + else { + print IDB "f 0444 root sys usr/samba/swat/$file packaging/SGI/swat/$file samba.sw.base\n"; + } +} + +print IDB "d 0755 root sys usr/samba/var/ packaging/SGI samba.sw.base\n"; +print IDB "d 0755 root sys usr/samba/var/locks/ packaging/SGI samba.sw.base\n"; + +print IDB "d 0755 root sys usr/share/catman/u_man/ packaging/SGI samba.man.manpages\n"; +$olddirnum = "0"; +while (@catman) { + $nextfile = shift @catman; + ($file = $nextfile) =~ s/^packaging\/SGI\/catman\///; + ($dirnum = $file) =~ s/^[\D]*//; + $dirnum =~ s/\.Z//; + if ($dirnum ne $olddirnum) { + print IDB "d 0755 root sys usr/share/catman/u_man/cat$dirnum packaging/SGI samba.man.manpages\n"; + $olddirnum = $dirnum; + } + print IDB "f 0664 root sys usr/share/catman/u_man/cat$dirnum/$file $nextfile samba.man.manpages\n"; +} + +close IDB; +print "\n\nsamba.idb file has been created\n"; + +sub dodir { + local($dir, $nlink) = @_; + local($dev,$ino,$mode,$subcount); + + ($dev,$ino,$mode,$nlink) = stat('.') unless $nlink; + + opendir(DIR,'.') || die "Can't open $dir"; + local(@filenames) = sort readdir(DIR); + closedir(DIR); + + if ($nlink ==2) { # This dir has no subdirectories. + for (@filenames) { + next if $_ eq '.'; + next if $_ eq '..'; + $this = substr($dir,2)."/$_"; + push(@allfiles,$this); + } + } + else { + $subcount = $nlink -2; + for (@filenames) { + next if $_ eq '.'; + next if $_ eq '..'; + next if $_ eq 'CVS'; + ($dev,$ino,$mode,$nlink) = lstat($_); + $name = "$dir/$_"; + $this = substr($name,2); + $this .= '/' if -d; + push(@allfiles,$this); + next if $subcount == 0; # seen all the subdirs? + + next unless -d _; + + chdir $_ || die "Can't cd to $name"; + &dodir($name,$nlink); + chdir '..'; + --$subcount; + } + } +} + +sub byfilename { + ($f0,$f1) = split(/\//,$a,2); + ($f0,$f2) = split(/\//,$b,2); + $f1 cmp $f2; +} + +sub bydirnum { + ($f1 = $a) =~ s/^.*\///; + ($f2 = $b) =~ s/^.*\///; + ($dir1 = $a) =~ s/^[\D]*//; + ($dir2 = $b) =~ s/^[\D]*//; + if (!($dir1 <=> $dir2)) { + $f1 cmp $f2; + } + else { + $dir1 <=> $dir2; + } +} diff --git a/packaging/SGI/inetd.sh b/packaging/SGI/inetd.sh new file mode 100755 index 00000000000..8c4c6cb8d8b --- /dev/null +++ b/packaging/SGI/inetd.sh @@ -0,0 +1,29 @@ +#! /bin/sh +# +# kill any running samba processes +# +/etc/killall smbd nmbd +chkconfig samba off + +# +# add SAMBA deamons to inetd.conf +# +cp /etc/inetd.conf /etc/inetd.O +sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.O > /etc/inetd.conf +echo '#SAMBA services' >> /etc/inetd.conf +echo netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd >> /etc/inetd.conf +echo netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf + +# +# add SAMBA service ports to /etc/services +# +cp /etc/services /etc/services.O +sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services +echo '#SAMBA services' >> /etc/services +echo 'netbios-ns 137/udp # SAMBA' >> /etc/services +echo 'netbios-ssn 139/tcp # SAMBA' >> /etc/services + +# +# restart inetd to start SAMBA +# +/etc/killall -HUP inetd diff --git a/packaging/SGI/legal_notice.html b/packaging/SGI/legal_notice.html new file mode 100644 index 00000000000..fdb76456289 --- /dev/null +++ b/packaging/SGI/legal_notice.html @@ -0,0 +1,53 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<HTML VERSION="2.0"> +<HEAD> +<TITLE>Silicon Graphics Freeware Legal Notice</TITLE> +</HEAD> + +<BODY> +<H1><A NAME="LEGAL">Silicon Graphics Freeware Legal Notice</A></H1> +<HR> +Copyright 1995, Silicon Graphics, Inc. -- ALL RIGHTS RESERVED +<P> +You may copy, modify, use and distribute this software, (i) +provided that you include the entirety of this reservation of +rights notice in all such copies, and (ii) you comply with any +additional or different obligations and/or use restrictions +specified by any third party owner or supplier of the software +in other notices that may be included with the software. + +<P> +SGI DISCLAIMS ALL WARRANTIES WITH RESPECT TO THIS SOFTWARE, +EXPRESS, IMPLIED, OR OTHERWISE, INCLUDING WITHOUT LIMITATION, +ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE OR NONINFRINGEMENT. SGI SHALL NOT BE LIABLE FOR ANY +SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING, +WITHOUT LIMITATION, LOST REVENUES, LOST PROFITS, OR LOSS OF +PROSPECTIVE ECONOMIC ADVANTAGE, RESULTING FROM THE USE OR MISUSE +OF THIS SOFTWARE. + +<P> +U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND: + +<P> + +Use, duplication or disclosure by the Government is subject to +restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph +(c)(1)(ii) of the Rights in Technical Data and Computer Software +clause at DFARS 252.227-7013 and/or in similar or successor +clauses in the FAR, or the DOD or NASA FAR Supplement. +Unpublished - rights reserved under the Copyright Laws of United +States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 +N. Shoreline Blvd. Mountain View, CA 94039-7311. + +<H3><A NAME="SUPPORT">Product Support</A></H3> + +<P> +Freeware products are not supported by Silicon Graphics or any +of its support providers. The software contained in this package +is made available through the generous efforts of their authors. +Although they are interested in your feedback, they are under no +obligation to address bugs, enhancements, or answer questions. + +</BODY> +</HTML> diff --git a/packaging/SGI/makefile.pl b/packaging/SGI/makefile.pl new file mode 100755 index 00000000000..d621097a227 --- /dev/null +++ b/packaging/SGI/makefile.pl @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +# This perl script creates the SGI specific Makefile. +# The BASEDIR is set to /usr/samba, MANDIR is set to /usr/share/man, and +# the lines are uncommented for the requested OS version. If no version +# is specified, IRIX 6 is used. + +if (!@ARGV) { + $OSver = "6"; +} +else { + $OSver = $ARGV[0]; +} + +open(MAKEIN,"../../source/Makefile") || die "Unable to open source Makefile\n"; +open(MAKEOUT,">Makefile") || die "Unable to open Makefile for output\n"; +while (<MAKEIN>) { + if (/^BASEDIR =/) { + print MAKEOUT "BASEDIR = /usr/samba\n"; + } + elsif (/^MANDIR =/) { + print MAKEOUT "MANDIR = /usr/share/man\n"; + } + elsif (/^# FOR SGI IRIX $OSver/) { + print MAKEOUT; + while (<MAKEIN>) { + last if ($_ eq "\n"); + if (/^# (FLAGSM|LIBSM|FLAGS1)/) { + s/^# //; + } + print MAKEOUT; + } + print MAKEOUT; + } + else { + print MAKEOUT; + } +} diff --git a/packaging/SGI/mkman b/packaging/SGI/mkman new file mode 100755 index 00000000000..4f14fafcdce --- /dev/null +++ b/packaging/SGI/mkman @@ -0,0 +1,27 @@ +#!/bin/sh +# if you wish to make html versions of the man pages then add the +# argument html when calling this script. You must have rman installed. +# + +if [ ! -d catman ]; then + mkdir catman +fi + +if [ "$1" = "html" ]; then + if [ ! -d html ]; then + mkdir html + fi +fi + + +FILES="*.?" + +cd ../../docs +for FILE in $FILES ; do + neqn $FILE | tbl | nroff -man > ../packaging/SGI/catman/`basename $FILE` + compress -f ../packaging/SGI/catman/`basename $FILE` + if [ "$1" = "html" ]; then + rman -f html -r "%s.%s.html" $FILE > ../packaging/SGI/html/$FILE.html + fi +done +cd ../packaging/SGI diff --git a/packaging/SGI/mkprintcap.sh b/packaging/SGI/mkprintcap.sh new file mode 100755 index 00000000000..f610e757f06 --- /dev/null +++ b/packaging/SGI/mkprintcap.sh @@ -0,0 +1,15 @@ +#! /bin/sh +# +# create printcap file +# +if [ -r /usr/samba/printcap ] +then + cp /usr/samba/printcap /usr/samba/printcap.O +fi + +echo "#" > /usr/samba/printcap +echo "# Samba printcap file" >> /usr/samba/printcap +echo "# Alias names are separated by |, any name with spaces is taken as a comment" >> /usr/samba/printcap +echo "#" >> /usr/samba/printcap +lpstat -a | sed -e "s/ .*//" >> /usr/samba/printcap + diff --git a/packaging/SGI/mkrelease.sh b/packaging/SGI/mkrelease.sh new file mode 100755 index 00000000000..d298095ae9e --- /dev/null +++ b/packaging/SGI/mkrelease.sh @@ -0,0 +1,82 @@ +#!/bin/sh + +# This file goes through all the necessary steps to build a release package. +# You may specify a OS major version number (4, 5, or 6) to specify which +# OS release to build. If no version number is given it will default to 6. + +doclean="" + +if [ "$1" = "clean" ]; then + doclean=$1 + shift +fi + +if [ "$doclean" = "clean" ]; then + cd ../../source + make distclean + cd ../packaging/SGI + rm -rf bins catman html codepages swat samba.idb samba.spec +fi + +# create the catman versions of the manual pages +# +echo Making manual pages +./mkman +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat making manual pages\n"; + exit $errstat; +fi + +cd ../../source +echo Create SGI specific Makefile +./configure --prefix=/usr --mandir=/usr/src/man +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat creating Makefile\n"; + exit $errstat; +fi + + +# build the sources +# +echo Making binaries + +if [ "$1" = "5" ]; then + make "CFLAGS=-O -g3" all +else + make "CFLAGS=-O -g3 -n32" all +fi + +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat building sources\n"; + exit $errstat; +fi + +cd ../packaging/SGI + +# generate the packages +# +echo Generating Inst Packages +./spec.pl # create the samba.spec file +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat creating samba.spec\n"; + exit $errstat; +fi + +./idb.pl # create the samba.idb file +errstat=$? +if [ $errstat -ne 0 ]; then + echo "Error $errstat creating samba.idb\n"; + exit $errstat; +fi + +if [ ! -d bins ]; then + mkdir bins +fi + +# do the packaging +/usr/sbin/gendist -rbase / -sbase ../.. -idb samba.idb -spec samba.spec -dist ./bins -all + diff --git a/packaging/SGI/printcap b/packaging/SGI/printcap new file mode 100644 index 00000000000..b67b9cb167c --- /dev/null +++ b/packaging/SGI/printcap @@ -0,0 +1,5 @@ +# +# Sample printcap file +# Alias names are separated by |, any name with spaces is taken as a comment +# +lp4js|lp12|LaserJet on the third floor by the coffee machine diff --git a/packaging/SGI/relnotes.html b/packaging/SGI/relnotes.html new file mode 100644 index 00000000000..7477d28c27d --- /dev/null +++ b/packaging/SGI/relnotes.html @@ -0,0 +1,233 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> +<HEAD> + <TITLE>Samba Release Notes</TITLE> +</HEAD> +<BODY> + +<H1>Samba Release Notes</H1> + +<P> +<HR></P> + +<H2>Table of Contents</H2> + +<MENU> +<LI><B><A HREF="#WHATIS">What is Samba?</A></B> </LI> + +<LI><B><A HREF="#Support">Support Policy</A> </B></LI> + +<LI><B><A HREF="#Installation">Installation Information</A> </B></LI> + +<LI><B><A HREF="legal_notice.html">Silicon +Graphics Legal Notice</A> </B></LI> + +<LI><B><A HREF="#AUTHORNOTES">Author's Notice(s)</A> </B></LI> + +<LI><B><A HREF="#Documentation">Documentation Information</A> </B></LI> +</MENU> + +<P> +<HR></P> + +<H2><A NAME="WHATIS"></A>What is Samba?</H2> + +<P>Samba is an SMB client and server for Unix. It makes it possible for +client machines running Windows 95 and Windows for Workgroups to access +files and/or print services on a Unix system. Samba includes an SMB server +to provide LanManager-style file and print services to PCs, a Netbios (RFC10001/1002) +name server, and an FTP-like client application for accessing PC resources +from Unix. </P> + +<P>To make Samba work you'll need to configure your server host to run +<B>smbd</B> and <B>nmbd</B> whenever you connect to a certain Internet +port from the client machine. <B>Smbd</B> and <B>nmbd</B> can be started +either as daemons or from inetd.</P> + +<P>By default <B>smbd</B> and <B>nmbd</B> are started as daemons by the +file <I>/etc/init.d/samba</I> in conjunction with the chkconfig variable +samba being set to on. If you set chkconfig samba off then the deamons +will not be automatically started on reboot. In this case you must type +the following at a shell prompt to start samba after a reboot: </P> + +<PRE><B> chkconfig samba on + /etc/init.d/samba start</B> +</PRE> + +<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B> +may be restarted by typing the following at a shell prompt: </P> + +<PRE><B> /etc/init.d/samba start</B> +</PRE> + +<P><B>smbd</B> and <B>nmbd</B> may be killed by typing the following at +a shell prompt: </P> + +<PRE><B> /etc/init.d/samba stop</B> +</PRE> + +<P>To have <B>smbd</B> and <B>nmbd</B> started by inetd you can execute +the shell script <I>/usr/samba/inetd.sh</I> to automatically configure +the various files and start the processes. This shell script first kills +any running <B>smbd</B> and <B>nmbd</B> processes. It then removes any +existing entries for "netbios*" from <I>/etc/inetd.conf</I> and +adds the following lines </P> + +<PRE><B> netbios-ssn stream tcp nowait root /usr/samba/bin/smbd smbd + netbios-ns dgram udp wait root /usr/samba/bin/nmbd nmbd -S</B> +</PRE> + +<P>It then removes any existing entries for "netbios*" from <I>/etc/services</I> +and adds the following lines </P> + +<PRE><B> netbios-ns 137/udp # SAMBA + netbios-ssn 139/tcp # SAMBA</B> +</PRE> + +<P><I>Inetd</I> is then restarted by executing:</P> + +<PRE><B> /etc/killall -HUP inetd</B> +</PRE> + +<P>If you make changes to your configuration files, <B>smbd</B> and <B>nmbd</B> +may be restarted by typing the following at a shell prompt: </P> + +<PRE><B> /etc/killall smbd nmbd + /etc/killall -HUP inetd</B> +</PRE> + +<H3><A NAME="AUTHORNOTES"></A>Author's Notice(s):</H3> + +<P>The author of this product is: Andrew Tridgell </P> + +<P>Samba is distributed freely under the <A HREF="COPYING">GNU +public license</A>. </P> + +<H3><A NAME="Support"></A>Support:</H3> + +<P>The software in this package is considered unsupported by Silicon Graphics. +Neither the authors or Silicon Graphics are compelled to help resolve problems +you may encounter in the installation, setup, or execution of this software. +To be more to the point, if you call us with an issue regarding products +in the Freeware package, we'll have to gracefully terminate the call. The +<A HREF="http://samba.anu.edu.au/pub/samba/"> +Samba Web Page</A> has a listing of companies and individuals that offer +commercial support for a fee. +</P> + +<H2><A NAME="Installation"></A>Installation Information</H2> + +<P>Samba includes these subsystems: </P> + +<TABLE> +<TR> +<TD ALIGN=LEFT><B>samba.sw.base</B> (<I>default</I>)</TD> + +<TD>Execution environment for Samba.</TD> +</TR> + +<TR> +<TD ALIGN=left><B>samba.man.manpages</B>(<I>default</I>)</TD> + +<TD>Samba's online manual pages (preformatted).</TD> +</TR> + +<TR> +<TD ALIGN=LEFT VALIGN=TOP><B>samba.man.doc</B> (<I>default</I>)</TD> + +<TD>Samba documentation: hints on installation and configuration, an FAQ +(Frequently Asked Questions), help in diagnosing problems, etc..</TD> +</TR> + +<TR> +<TD ALIGN=left><B>samba.man.relnotes</B> (<I>default</I>) </TD> + +<TD>Samba online release notes.</TD> +</TR> + +<TR> +<TD ALIGN=LEFT VALIGN=TOP><B>samba.src.samba</B> </TD> + +<TD>The Samba software distribution from which this product was +built (including the packaging/SGI directory which will allow this distribution +to be rebuilt).</TD> +</TR> +</TABLE> + +<H3>Installation Method</H3> + +<P>All of the subsystems for Samba can be installed using IRIX. You do +not need to use the miniroot. Refer to the <I>Software Installation Administrator's +Guide</I> for complete installation instructions. </P> + +<H3>Prerequisites</H3> + +<P>Your workstation must be running IRIX 5.3 or later in order to use this +product. </P> + +<H3>Configuration Files</H3> + +<P>Because configuration files often contain modifications, inst treats +them specially during the installation process. If they have not been modified, +inst removes the old file and installs the new version during software +updates. For configuration files that have been modified, the new version +is installed and the old version is renamed by adding the suffix .O (for +older) to the name. The no-suffix version contains changes that are required +for compatibility with the rest of the newly installed software, that increase +functionality, or that fix bugs. You should use diff(1) or gdiff(1) to +compare the two versions of the files and transfer information that you +recognize as machine or site-specific from the .O version to the no-suffix +version. </P> + +<DL> +<DT><B>/usr/samba/lib/smb.conf</B> </DT> + +<DD>Configuration definitions for the <B>smbd</B> program; the SMB server +process. The default configuration sets up password-based access to home +directories on a machine as well as open access to to all printers and +/tmp. The workgroup is set by default to "workgroup". It is highly +recommended that administrators review the content of this file when installing +Samba for the first time.</DD> + +<DT><B>/usr/samba/printcap</B> </DT> + +<DD>A file that specifies the available printers on a system. It is included +as an example; administrators may want to replace it or override the reference +to it in the <B>smb.conf</B> file. The script <B>/usr/samba/mkprintcap.sh</B> +was used by inst to create a printcap file that contains all printers on +your system. You may wish to remove some printers or add a comment to each +printer name to describe its location.</DD> +</DL> + +<H2><A NAME="Documentation"></A>Documentation Information</H2> + +<P>Preformatted manual pages are installed by default as are the contents +of the <B>docs</B> directory from the Samba distribution; consult <I>samba</I>(7) +for an introduction. </P> + +<P>There is a mailing list for discussion of Samba. To subscribe send mail +to <A HREF="mailto:listproc@samba.anu.edu.au">listproc@samba.anu.edu.au</A> +with a body of "subscribe samba Your Name" </P> + +<P>To send mail to everyone on the list mail to <A HREF="mailto:samba@samba.anu.edu.au">samba@samba.anu.edu.au</A>. +</P> + +<P>There is also an announcement mailing list where new versions are announced. +To subscribe send mail to <A HREF="mailto:listproc@samba.anu.edu.au">listproc@samba.anu.edu.au</A> +with a body of "subscribe samba-announce Your Name". All announcements +also go to the samba list. </P> + +<P>You might also like to look at the Usenet news group <A HREF="news:comp.protocols.smb">comp.protocols.smb</A> +as it often contains lots of useful info and is frequented by lots of Samba +users. The newsgroup was initially setup by people on the Samba mailing +list. It is not, however, exclusive to Samba, it is a forum for discussing +the SMB protocol (which Samba implements). </P> + +<P>A Samba WWW site has been setup with lots of useful info. Connect to: +<A HREF="http://samba.anu.edu.au/pub/samba/">http://samba.anu.edu.au/pub/samba/</A>. +It is maintained by Paul Blackman (thanks Paul!). You can contact him at +<A HREF="mailto:ictinus@lake.canberra.edu.au">ictinus@lake.canberra.edu.au</A>. +</P> + +</BODY> +</HTML> diff --git a/packaging/SGI/samba.config b/packaging/SGI/samba.config new file mode 100644 index 00000000000..b3d86404ab5 --- /dev/null +++ b/packaging/SGI/samba.config @@ -0,0 +1 @@ +on diff --git a/packaging/SGI/samba.rc b/packaging/SGI/samba.rc new file mode 100644 index 00000000000..121b3400a38 --- /dev/null +++ b/packaging/SGI/samba.rc @@ -0,0 +1,42 @@ +#! /bin/sh + +# +# Samba server control +# + +IS_ON=/etc/chkconfig +KILLALL=/sbin/killall + +SAMBAD=/usr/samba/bin/smbd +#SAMBA_OPTS=-d2 +NMBD=/usr/samba/bin/nmbd +#NMBD_OPTS=-d1 + +if test ! -x $IS_ON ; then + IS_ON=true +fi + +if $IS_ON verbose ; then + ECHO=echo +else # For a quiet startup and shutdown + ECHO=: +fi + +case $1 in +'start') + if $IS_ON samba && test -x $SAMBAD; then + $KILLALL -15 smbd nmbd + $ECHO "Samba:\c" + $SAMBAD $SAMBA_OPTS -D; $ECHO " smbd\c" + $NMBD $NMBD_OPTS -D; $ECHO " nmbd\c" + $ECHO "." + fi + ;; +'stop') + $ECHO "Stopping Samba Servers." + $KILLALL -15 smbd nmbd + ;; +*) + echo "usage: /etc/init.d/samba {start|stop}" + ;; +esac diff --git a/packaging/SGI/sambalp b/packaging/SGI/sambalp new file mode 100644 index 00000000000..fd0cef8f933 --- /dev/null +++ b/packaging/SGI/sambalp @@ -0,0 +1,150 @@ +#!/bin/perl +# +# Hacked by Alan Stebbens <aks@sgi.com> to setuid to the username if +# valid on this system. Written as a secure Perl script. To enable, +# +# chown root /usr/samba/bin/sambalp +# chmod u+s,+x /usr/samba/bin/sambalp +# +# If setuidshells is not enabled on your system, you must also do this: +# +# systune -i +# nosuidshells = 0 +# y +# quit +# +# reboot +# +# This script will still work as a normal user; it will not try +# to setuid in this case. +# +# If the "$PSFIX" variable is set below... +# +# Workaround Win95 printer driver/Impressario bug by removing +# the PS check for available virtual memory. Note that this +# bug appears to be in all Win95 print drivers that generate +# PostScript; but is for certain there with a QMS-PS 810 (the +# printer type I configure on the Win95-side for printing with +# Samba). +# +# the perl script fixes 3 different bugs. +# 1. remove the JCL statements added by some HP printer drivers to the +# beginning of the postscript output. +# 2. Fix a bug in output from word files with long filenames. A non-printing +# character added to the end of the title comment by word is +# removed. +# 3. The VM fix described above. +# +# +# Modified for Perl4 compatibility. +# + +$PROG = "sambalp"; + +$PSFIX = 1; # set to 0 if you don't want to run + # the "psfix" portion + +# Untaint the PATH variable +@PATH = split(' ',<<EOF); + /usr/sbin /usr/bsd /sbin /usr/bin /bin /usr/lib /usr/local/bin +EOF +$ENV{'PATH'} = join(':',@PATH); + +if ($#ARGV < 3) { + print STDERR "usage: $PROG printer file user system\n"; + exit; +} + +$printer = $ARGV[0]; +$file = $ARGV[1]; +$user = $ARGV[2]; +$system = $ARGV[3]; + +open(LPSTAT,"/usr/bin/lpstat -t|") || die("Can't get printer list.\n"); +@printers = (); +while (<LPSTAT>) { + next unless /^printer (\w+)/; + push(@printers,$1); +} +close LPSTAT; +# Create a hash list +@printers{@printers} = @printers; + +# Untaint the printer name +if (defined($prtname = $printers{$printer})) { + $printer = $prtname; +} else { + die("Unknown printer: \"$printer\"\n"); +} + +if ($> == 0) { # are we root? + # yes -- then perform a taint checks and possibly do a suid check + + # Untaint the file and system names (pretend to filter them) + $file = $file =~ /^(.*)/ ? $1 : die("Bad file: $file\n"); + $system = $system =~ /^(.*)/ ? $1 : die("Bad system: $system\n"); + + # Get the valid users + setpwent; + %users = (); + while (@pwe = getpwent()) { + $uids{$pwe[0]} = $pwe[2]; + $users{$pwe[2]} = $pwe[0]; + } + endpwent(); + + # Check out the user -- if the user is a real user on this system, + # then become that user so that the printer header page looks right + # otherwise, remain as the default user (probably "nobody"). + + if (defined($uid = $uids{$user})) { + + # before we change UID, we must ensure that the file is still + # readable after the UID change. + chown($uid, 9, $file); # make the file owned by the user + + # Now, go ahead and become the user + $name = $users{$uid}; + $> = $uid; # become the user + $< = $uid; + } else { # do untaint filtering + $name = $user =~ /^(\w+)/ ? $1 : die("Bad user: $user\n"); + } +} else { # otherwise, just be me + $name = $user; # whomever that is +} + +$lpcommand = "/usr/bin/lp -c -d$printer -t'$name on $system'"; + +# This code is from the original "psfix" but it has been completely +# rewritten for speed. + +if ($PSFIX) { # are we running a "psfix"? + open(FILE, $file) || die("Can't read $file: $!\n"); + open(LP, "|$lpcommand -") || die("Can't open pipe to \"lp\": $!\n"); + select(LP); + while (<FILE>) { # + $_ =~ s/^\004//; # strip any ctrl-d's + if (/^\e%/) { # get rid of any non-postscript commands + while (<FILE>) { # remove text until next %!PS + s/^\001M//; # lenmark driver prefixes Ctrl-A M to %!PS + last if /^%!PS/; + } + last if eof(FILE); + } elsif (/^%%Title:/) { # fix bug in long titles from MS Word + s/.\r$/\r/; # remove trailing character on the title + } elsif (/^\/VM\?/) { # remove VM test + print "/VM? { pop } bind def\r\n"; + while (<FILE>) { last if /def\r/; } + next; # don't print + } + print; + } + close FILE; + close LP; +} else { # we're not running psfix? + system("$lpcommand $file"); +} + +# Remove the file only if it lives in /usr/tmp, /tmp, or /var/tmp. +unlink($file) if $file =~ m=^(/(usr|var))?/tmp=; diff --git a/packaging/SGI/smb.conf b/packaging/SGI/smb.conf new file mode 100644 index 00000000000..b7cbae63d15 --- /dev/null +++ b/packaging/SGI/smb.conf @@ -0,0 +1,122 @@ +; Configuration file for smbd. +; ============================================================================ +; For the format of this file and comprehensive descriptions of all the +; configuration option, please refer to the man page for smb.conf(5). + +; This is a sample configuration for IRIX 6.x systems +; +; The following configuration should suit most systems for basic usage and +; initial testing. It gives all clients access to their home directories and +; /usr/tmp and allows access to all printers returned by lpstat. +; +[global] + comment = Samba %v + workgroup = workgroup + printing = sysv +; +; The default for printcap name is lpstat which will export all printers. +; If you want to limit the printers that are visible to clients, you can +; use a printcap file. The script mkprintcap.sh will create a printcap +; file that contains all your printers. Edit this file to only contain the +; printers that you wish to be visible. Names longer than 15 characters +; in the printcap file will not be visible to clients. +; +; printcap name = /usr/samba/printcap +; +; If you are using Impressario 1.x then you'll want to use the +; sambalp script provided with this package. It works around +; a problem in the PostScript generated by the standard Windows +; drivers--there is a check to verify sufficient virtual memory +; is available in the printer to print the job, but this fails +; under Impressario because of a bug in Impressario 1.x. The sambalp +; script strips out the vmstatus check. BTW, when using this +; setup to print be sure to configure a Windows printer driver +; that generates PostScript--QMS-PS 810 is one that should work +; with the sambalp script. This version of sambalp (if installed +; as a setuid script - see the comments at the beginning of the +; script) will setuid to the username if valid on the system. This +; makes the banner pages print the proper username. You can disable +; the PostScript fixes by changing a variable in sambalp. +; + print command = /usr/samba/bin/sambalp %p %s %U %m +; print command = /usr/bin/lp -c -d%p -t"%U on machine %m" %s ; rm %s + + load printers = yes + guest account = nobody + browseable = yes + +; this tells Samba to use a separate log file for each machine +; that connects - default is single file named /usr/samba/var/log.smb +; log file = /usr/samba/var/log.%m + +; Set a max size for log files in Kb + max log size = 50 + +; You will need a world readable lock directory and "share modes=yes" +; if you want to support the file sharing modes for multiple users +; of the same files + locking = yes + lock directory = /usr/samba/var/locks + share modes = yes + +; security = user + +; You need to test to see if this makes a difference on your system + socket options = TCP_NODELAY + +; Set the os level to > 32 if there is no NT server for your workgroup + os level = 0 + preferred master = no + domain master = no + local master = no + wins support = no + wins server = + + preserve case = yes + short preserve case = yes + +[homes] + comment = Home Directories + browseable = no + writable = yes + +; To allow Win95 clients to automatically load printer drivers, uncomment +; the following section (and the lines in the printers section below). +; Run the make_printerdef command to create the /usr/samba/lib/printers.def +; file (see the PRINTER_DRIVER.txt file in the docs directory for info). +; Copy all the required files to the /usr/samba/printer directory +; +;[printer$] +; comment = printer driver directory +; path=/usr/samba/printer +; public=yes +; writable=no +; browseable=yes + +[printers] + comment = All Printers + path = /usr/tmp + browseable = no + printable = yes + public = yes + writable = no + create mask = 0700 +; +; this specifies the location of the share containing the printer driver +; files - see the printer$ section above +; +; printer driver location = \\%h\printer$ +; +; the following line will make all printers default to the QMS-PS 810 Turbo +; driver - which works quite well for Impressario. If you need a diferent +; driver for a specific printer, create a section for that printer and +; specify the correct printer driver. +; +; printer driver = QMS-PS 810 Turbo + + +[tmp] + comment = Temporary file space + path = /usr/tmp + read only = no + public = yes diff --git a/packaging/SGI/smbpasswd b/packaging/SGI/smbpasswd new file mode 100644 index 00000000000..8e7ab34cadd --- /dev/null +++ b/packaging/SGI/smbpasswd @@ -0,0 +1 @@ +# Samba SMB password file diff --git a/packaging/SGI/smbprint b/packaging/SGI/smbprint new file mode 100644 index 00000000000..0db8b6f7e3a --- /dev/null +++ b/packaging/SGI/smbprint @@ -0,0 +1,54 @@ +#!/bin/sh +# +# @(#) smbprint.sysv version 1.0 Ross Wakelin <r.wakelin@march.co.uk> +# +# Version 1.0 13 January 1995 +# modified from the original smbprint (bsd) script +# +# this script is a System 5 printer interface script. It uses the smbclient +# program to print the file to the specified smb-based server and service. +# +# To add this to your lp system, modify the server and service variables +# and then execute the following command (as root): +# +# lpadmin -punixprintername -v/dev/null -i/usr/samba/bin/smbprint +# +# where unixprintername is the name that the printer will be known as +# on your unix box. +# +# the script smbprint will be copied into your printer administration +# directory (/usr/spool/lp) as a new interface (interface/unixprintername) +# Then you have to execute the following commands: +# +# enable unixprintername +# accept unixprintername +# +# This script will then be called by the lp service to print the files. +# This script will have 6 or more parameters passed to it by the lp service. +# The first five will contain details of the print job, who queued it etc, +# while parameters 6 onwards are a list of files to print. We just +# cat these to the samba client. +# +# clear out the unwanted parameters + +shift;shift;shift;shift;shift + +# now the argument list is just the files to print + +# Set these to the server and service you wish to print to +# In this example I have a PC called "admin" that has a printer +# exported called "hplj2" with no password. +# +server=admin +service=hplj2 +password="" + +# NOTE: The line `echo translate' provides automatic CR/LF translation +# when printing. +( + echo translate + echo "print -" + cat $* +) | /usr/samba/bin/smbclient "\\\\$server\\$service" $password -N -P > /dev/null +exit $? + diff --git a/packaging/SGI/spec.pl b/packaging/SGI/spec.pl new file mode 100755 index 00000000000..3bd643eef6e --- /dev/null +++ b/packaging/SGI/spec.pl @@ -0,0 +1,87 @@ +#!/usr/bin/perl + +# This perl script generates the samba.spec file based on the version +# information in the version.h file in the source tree + +open (VER,'../../source/include/version.h') || die "Unable to open version.h\n"; +($_ = <VER>) =~ s/"//g; +close (VER); +@foo = split(' '); +splice(@foo,0,2); +$_ = $foo[0]; + +# create the package name +$vername = " id \"Samba Version ".$_."\"\n"; + +$patch = 0; +#create the subsystem version numbers +if (/alpha/) { + $_ =~ s/alpha/.00./; +} +elsif (/-HEAD/) { + $_ =~ s/-HEAD/.01/; + $_ .= '.99'; +} +elsif (/p/) { + $_ =~ s/p/./; + $_ .= '.00'; + $patch = 1; +} +else { + $_ .='.01.00'; +} + +($v1,$v2,$v3,$v4,$v5) = split('\.'); +$v4 = $v4 + $patch; +$vernum = sprintf(" version %02d%02d%02d%02d%02d\n",$v1,$v2,$v3,$v4,$v5); + +# generate the samba.spec file +open(SPEC,">samba.spec") || die "Unable to open samba.spec for output\n"; +print SPEC "product samba\n"; +print SPEC $vername; +print SPEC " image sw\n"; +print SPEC " id \"Samba Execution Environment\"\n"; +print SPEC $vernum; +print SPEC " order 0\n"; +print SPEC " subsys base default\n"; +print SPEC " id \"Samba Execution Environment\"\n"; +print SPEC " replaces fw_samba.sw.base 0 9999999999\n"; +print SPEC " replaces fw_samba.sw.samba 0 9999999999\n"; +print SPEC " exp samba.sw.base\n"; +print SPEC " endsubsys\n"; +print SPEC " endimage\n"; +print SPEC " image man\n"; +print SPEC " id \"Samba Online Documentation\"\n"; +print SPEC $vernum; +print SPEC " order 1\n"; +print SPEC " subsys manpages default\n"; +print SPEC " id \"Samba Man Page\"\n"; +print SPEC " replaces fw_samba.man.manpages 0 9999999999\n"; +print SPEC " replaces fw_samba.man.samba 0 9999999999\n"; +print SPEC " exp samba.man.manpages\n"; +print SPEC " endsubsys\n"; +print SPEC " subsys doc default\n"; +print SPEC " id \"Samba Documentation\"\n"; +print SPEC " replaces fw_samba.man.doc 0 9999999999\n"; +print SPEC " exp samba.man.doc\n"; +print SPEC " endsubsys\n"; +print SPEC " subsys relnotes default\n"; +print SPEC " id \"Samba Release Notes\"\n"; +print SPEC " replaces fw_samba.man.relnotes 0 9999999999\n"; +print SPEC " exp samba.man.relnotes\n"; +print SPEC " endsubsys\n"; +print SPEC " endimage\n"; +print SPEC " image src\n"; +print SPEC " id \"Samba Source Code\"\n"; +print SPEC $vernum; +print SPEC " order 2\n"; +print SPEC " subsys samba\n"; +print SPEC " id \"Samba Source Code\"\n"; +print SPEC " replaces fw_samba.src.samba 0 9999999999\n"; +print SPEC " exp samba.src.samba\n"; +print SPEC " endsubsys\n"; +print SPEC " endimage\n"; +print SPEC "endproduct\n"; +close SPEC || die "Error on close of samba.spec\n"; + +print "\nsamba.spec file has been created\n\n"; diff --git a/packaging/SGI/startswat.sh b/packaging/SGI/startswat.sh new file mode 100755 index 00000000000..c2fc9fb467d --- /dev/null +++ b/packaging/SGI/startswat.sh @@ -0,0 +1,21 @@ +#! /bin/sh +# +# add SWAT deamon to inetd.conf +# +cp /etc/inetd.conf /etc/inetd.O +sed -e "/^swat/D" -e "/^#SWAT/D" /etc/inetd.O > /etc/inetd.conf +echo '#SWAT services' >> /etc/inetd.conf +echo swat stream tcp nowait root /usr/samba/bin/swat swat >> /etc/inetd.conf + +# +# add SWAT service port to /etc/services +# +cp /etc/services /etc/services.O +sed -e "/^swat/D" -e "/^#SWAT/D" /etc/services.O > /etc/services +echo '#SWAT services' >> /etc/services +echo 'swat 901/tcp # SWAT' >> /etc/services + +# +# restart inetd to start SWAT +# +/etc/killall -HUP inetd |