summaryrefslogtreecommitdiffstats
path: root/source/script
diff options
context:
space:
mode:
authorcvs2svn Import User <samba-bugs@samba.org>1997-07-01 01:19:14 +0000
committercvs2svn Import User <samba-bugs@samba.org>1997-07-01 01:19:14 +0000
commitad00237aafd5f68c89df5da4bae7f98b95741200 (patch)
treec163ab405805300cac2da0c6d20f72e45253d6e1 /source/script
parent1c6e433caa22813a699c9766847886eb59755f8b (diff)
downloadsamba-ad00237aafd5f68c89df5da4bae7f98b95741200.tar.gz
samba-ad00237aafd5f68c89df5da4bae7f98b95741200.tar.xz
samba-ad00237aafd5f68c89df5da4bae7f98b95741200.zip
This commit was manufactured by cvs2svn to create tagsamba-misc-tags/pre_luke_stuffup_1
'pre_luke_stuffup_1'.
Diffstat (limited to 'source/script')
-rw-r--r--source/script/addtosmbpass74
-rwxr-xr-xsource/script/installbin.sh44
-rwxr-xr-xsource/script/installman.sh38
-rwxr-xr-xsource/script/installscripts.sh43
-rw-r--r--source/script/mkproto.awk82
-rwxr-xr-xsource/script/mksmbpasswd.sh6
-rwxr-xr-xsource/script/revert.sh15
-rw-r--r--source/script/smbtar140
-rwxr-xr-xsource/script/uninstallbin.sh43
-rwxr-xr-xsource/script/uninstallman.sh31
-rwxr-xr-xsource/script/uninstallscripts.sh37
-rwxr-xr-xsource/script/updatesmbpasswd.sh14
12 files changed, 0 insertions, 567 deletions
diff --git a/source/script/addtosmbpass b/source/script/addtosmbpass
deleted file mode 100644
index 42af518397c..00000000000
--- a/source/script/addtosmbpass
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/awk -f
-# edit the line above to point to your real location of awk interpreter
-
-# awk program for adding new entries in smbpasswd files
-# arguments are account names to add; feed it an existent Samba password
-# file on stdin, results will be written on stdout
-#
-# Michal Jaegermann, michal@ellpspace.math.ualberta.ca, 1995-11-09
-
-BEGIN {
- me = "addtosmbpass";
- count = ARGC;
- FS = ":";
-
- if (count == 1) {
- print "Usage:", me,
- "name1 [name2 ....] < smbpasswd.in > smbpasswd.out";
- ARGV[1] = "/dev/null";
- ARGC = 2;
- exit;
- }
-
- for(i = 1; i < count; i++) {
- names[ARGV[i]] = " ";
- delete ARGV[i];
- }
-# sane awk should work simply with 'ARGC = 1', but not every awk
-# implementation is sane - big sigh!!
- ARGV[1] = "-";
- ARGC = 2;
-#
-# If you have ypmatch but is not RPC registered (some Linux systems
-# for example) comment out the next line.
-# "which ypmatch" | getline ypmatch;
- if (1 != match(ypmatch, /^\//)) {
- ypmatch = "";
- }
- pwdf = "/etc/passwd";
-}
-#check for names already present in input
-{
- print $0;
- for(name in names) {
- if($1 ~ name) {
- delete names[name];
- }
- }
-}
-END {
- fmt = "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:";
- fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n";
- for(name in names) {
- while ((getline < pwdf) > 0) {
- if ($1 == name) {
- printf(fmt, $1, $3, $5, $6, $7);
- close(pwdf);
- notfound = "";
- break;
- }
- notfound = "n";
- }
- $0 = "";
- if (notfound && ypmatch) {
-# try to find in NIS databases
- command = ypmatch " " name " passwd";
- command | getline;
- if (NF > 0) {
- printf(fmt, $1, $3, $5, $6, $7);
- }
- close(command);
- }
- }
-}
-
diff --git a/source/script/installbin.sh b/source/script/installbin.sh
deleted file mode 100755
index b976a3e5ea8..00000000000
--- a/source/script/installbin.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-INSTALLPERMS=$1
-BASEDIR=$2
-BINDIR=$3
-LIBDIR=$4
-VARDIR=$5
-shift
-shift
-shift
-shift
-shift
-
-for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do
-if [ ! -d $d ]; then
-mkdir $d
-if [ ! -d $d ]; then
- echo Failed to make directory $d
- exit 1
-fi
-fi
-done
-
-
-for p in $*; do
- echo Installing $p as $BINDIR/$p
- if [ -f $BINDIR/$p ]; then
- mv $BINDIR/$p $BINDIR/$p.old
- fi
- cp $p $BINDIR/$p
- chmod $INSTALLPERMS $BINDIR/$p
-done
-
-
-cat << EOF
-======================================================================
-The binaries are installed. You may restore the old binaries (if there
-were any) using the command "make revert". You may uninstall the binaries
-using the command "make uninstallbin" or "make uninstall" to uninstall
-binaries, man pages and shell scripts.
-======================================================================
-EOF
-
-exit 0
-
diff --git a/source/script/installman.sh b/source/script/installman.sh
deleted file mode 100755
index 3c8fc718654..00000000000
--- a/source/script/installman.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values
-
-MANDIR=$1
-SRCDIR=$2
-
-echo Installing man pages in $MANDIR
-
-for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do
-if [ ! -d $d ]; then
-mkdir $d
-if [ ! -d $d ]; then
- echo Failed to make directory $d, does $USER have privileges?
- exit 1
-fi
-fi
-done
-
-for sect in 1 5 7 8 ; do
- for m in $MANDIR/man$sect ; do
- for s in $SRCDIR../docs/*$sect; do
- FNAME=$m/`basename $s`
- cp $s $m || echo Cannot create $FNAME... does $USER have privileges?
- chmod 0644 $FNAME
- done
- done
-done
-
-cat << EOF
-======================================================================
-The man pages have been installed. You may uninstall them using the command
-the command "make uninstallman" or make "uninstall" to uninstall binaries,
-man pages and shell scripts.
-======================================================================
-EOF
-
-exit 0
-
diff --git a/source/script/installscripts.sh b/source/script/installscripts.sh
deleted file mode 100755
index 1a230c8cfa2..00000000000
--- a/source/script/installscripts.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# this script courtesy of James_K._Foote.PARC@xerox.com
-# 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make
-
-INSTALLPERMS=$1
-BINDIR=$2
-
-shift
-shift
-
-echo Installing scripts in $BINDIR
-
-for d in $BINDIR; do
- if [ ! -d $d ]; then
- mkdir $d
- if [ ! -d $d ]; then
- echo Failed to make directory $d
- echo Have you run installbin first?
- exit 1
- fi
- fi
-done
-
-for p in $*; do
- echo Installing $BINDIR/$p
- cp $p $BINDIR/$p
- if [ ! -f $BINDIR/$p ]; then
- echo Cannot copy $p... does $USER have privileges?
- fi
- echo Setting permissions on $BINDIR/$p
- chmod $INSTALLPERMS $BINDIR/$p
-done
-
-cat << EOF
-======================================================================
-The scripts have been installed. You may uninstall them using
-the command "make uninstallscripts" or "make install" to install binaries,
-man pages and shell scripts. You may recover the previous version (if any
-by "make revert".
-======================================================================
-EOF
-
-exit 0
diff --git a/source/script/mkproto.awk b/source/script/mkproto.awk
deleted file mode 100644
index 08b13d46108..00000000000
--- a/source/script/mkproto.awk
+++ /dev/null
@@ -1,82 +0,0 @@
-BEGIN {
- inheader=0;
- current_file="";
- print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
- print ""
-}
-
-{
- if (FILENAME!=current_file) {
- print ""
- print "/*The following definitions come from ",FILENAME," */"
- print ""
- current_file=FILENAME
- }
- if (inheader) {
- if (match($0,"[)][ \t]*$")) {
- inheader = 0;
- printf "%s;\n",$0;
- } else {
- printf "%s\n",$0;
- }
- next;
- }
-}
-
-# we handle the loadparm.c fns separately
-
-/^FN_LOCAL_BOOL/ {
- split($0,a,"[,()]")
- printf "BOOL %s(int );\n", a[2]
-}
-
-/^FN_LOCAL_STRING/ {
- split($0,a,"[,()]")
- printf "char *%s(int );\n", a[2]
-}
-
-/^FN_LOCAL_INT/ {
- split($0,a,"[,()]")
- printf "int %s(int );\n", a[2]
-}
-
-/^FN_LOCAL_CHAR/ {
- split($0,a,"[,()]")
- printf "char %s(int );\n", a[2]
-}
-
-/^FN_GLOBAL_BOOL/ {
- split($0,a,"[,()]")
- printf "BOOL %s(void);\n", a[2]
-}
-
-/^FN_GLOBAL_STRING/ {
- split($0,a,"[,()]")
- printf "char *%s(void);\n", a[2]
-}
-
-/^FN_GLOBAL_INT/ {
- split($0,a,"[,()]")
- printf "int %s(void);\n", a[2]
-}
-
-/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
- next;
-}
-
-!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^shm_offset_t/ {
- next;
-}
-
-
-/[(].*[)][ \t]*$/ {
- printf "%s;\n",$0;
- next;
-}
-
-/[(]/ {
- inheader=1;
- printf "%s\n",$0;
- next;
-}
-
diff --git a/source/script/mksmbpasswd.sh b/source/script/mksmbpasswd.sh
deleted file mode 100755
index 6e592acd652..00000000000
--- a/source/script/mksmbpasswd.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-awk 'BEGIN {FS=":"
- printf("#\n# SMB password file.\n#\n")
- }
-{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }
-'
diff --git a/source/script/revert.sh b/source/script/revert.sh
deleted file mode 100755
index 68b47bf39d0..00000000000
--- a/source/script/revert.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-BINDIR=$1
-shift
-
-for p in $*; do
- if [ -f $BINDIR/$p.old ]; then
- echo Restoring $BINDIR/$p.old as $BINDIR/$p
- mv $BINDIR/$p $BINDIR/$p.new
- mv $BINDIR/$p.old $BINDIR/$p
- rm -f $BINDIR/$p.new
- fi
-done
-
-exit 0
-
diff --git a/source/script/smbtar b/source/script/smbtar
deleted file mode 100644
index a947476dc6b..00000000000
--- a/source/script/smbtar
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/bin/sh
-#
-# smbtar script - front end to smbclient
-#
-# Authors: Martin.Kraemer <Martin.Kraemer@mch.sni.de>
-# and Ricky Poulten (ricky@logcam.co.uk)
-#
-# (May need to change shell to ksh for HPUX or OSF for better getopts)
-
-case $0 in
- # when called by absolute path, assume smbclient is in the same directory
- /*)
- SMBCLIENT="`dirname $0`/smbclient";;
- *) # you may need to edit this to show where your smbclient is
- SMBCLIENT="smbclient";;
-esac
-
-# These are the default values. You could fill them in if you know what
-# you're doing, but beware: better not store a plain text password!
-server=""
-service="backup" # Default: a service called "backup"
-password=""
-username=$LOGNAME # Default: same user name as in *nix
-verbose="2>/dev/null" # Default: no echo to stdout
-log="-d 2"
-newer=""
-blocksize=""
-tarcmd="c"
-tarargs=""
-cdcmd="\\"
-tapefile=${TAPE-tar.out}
-
-Usage(){
- ex=$1
- shift
-echo >&2 "Usage: `basename $0` [<options>] [<include/exclude files>]
-Function: backup/restore a Windows PC directories to a local tape file
-Options: (Description) (Default)
- -r Restore from tape file to PC Save from PC to tapefile
- -i Incremental mode Full backup mode
- -v Verbose mode: echo command Don't echo anything
- -s <server> Specify PC Server $server
- -p <password> Specify PC Password $password
- -x <share> Specify PC Share $service
- -X Exclude mode Include
- -N <newer> File for date comparison `set -- $newer; echo $2`
- -b <blocksize> Specify tape's blocksize `set -- $blocksize; echo $2`
- -d <dir> Specify a directory in share $cdcmd
- -l <log> Specify a Samba Log Level `set -- $log; echo $2`
- -u <user> Specify User Name $username
- -t <tape> Specify Tape device $tapefile
-"
- echo >&2 "$@"
- exit $ex
-}
-
-while getopts rivl:b:d:N:s:p:x:u:Xt: c; do
- case $c in
- r) # [r]estore to Windows (instead of the default "Save from Windows")
- tarcmd="x"
- ;;
- i) # [i]ncremental
- tarargs=${tarargs}g
- ;;
- l) # specify [l]og file
- log="-d $OPTARG"
- case "$OPTARG" in
- [0-9]*) ;;
- *) echo >&2 "$0: Error, log level not numeric: -l $OPTARG"
- exit 1
- esac
- ;;
- d) # specify [d]irectory to change to in server's share
- cdcmd="$OPTARG"
- ;;
- N) # compare with a file, test if [n]ewer
- if [ -f $OPTARG ]; then
- newer=$OPTARG
- tarargs=${tarargs}N
- else
- echo >&2 $0: Warning, $OPTARG not found
- fi
- ;;
- X) # Add exclude flag
- tarargs=${tarargs}X
- ;;
- s) # specify [s]erver's share to connect to - this MUST be given.
- server="$OPTARG"
- ;;
- b) # specify [b]locksize
- blocksize="blocksize $OPTARG"
- case "$OPTARG" in
- [0-9]*) ;;
- *) echo >&2 "$0: Error, block size not numeric: -b $OPTARG"
- exit 1
- esac
- tarargs=${tarargs}b
- ;;
- p) # specify [p]assword to use
- password="$OPTARG"
- ;;
- x) # specify windows [s]hare to use
- service="$OPTARG"
- ;;
- t) # specify [t]apefile on local host
- tapefile="$OPTARG"
- ;;
- u) # specify [u]sername for connection
- username="$OPTARG"
- ;;
- v) # be [v]erbose and display what's going on
- verbose=""
- ;;
- '?') # any other switch
- Usage 2 "Invalid switch specified - abort."
- ;;
- esac
-done
-
-shift `expr $OPTIND - 1`
-
-if [ "$server" = "" ] || [ "$service" = "" ]; then
- Usage 1 "No server or no service specified - abort."
-fi
-
-# if the -v switch is set, the echo the current parameters
-if [ -z "$verbose" ]; then
- echo "server is $server"
-# echo "share is $service"
- echo "share is $service\\$cdcmd"
- echo "tar args is $tarargs"
-# echo "password is $password" # passwords should never be sent to screen
- echo "tape is $tapefile"
- echo "blocksize is $blocksize"
-fi
-
-eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \
--E -N $log -D "'$cdcmd'" \
--T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose
-
diff --git a/source/script/uninstallbin.sh b/source/script/uninstallbin.sh
deleted file mode 100755
index fab36804a29..00000000000
--- a/source/script/uninstallbin.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-#4 July 96 Dan.Shearer@UniSA.edu.au
-
-INSTALLPERMS=$1
-BASEDIR=$2
-BINDIR=$3
-LIBDIR=$4
-VARDIR=$5
-shift
-shift
-shift
-shift
-shift
-
-if [ ! -d $BINDIR ]; then
- echo Directory $BINDIR does not exist!
- echo Do a "make installbin" or "make install" first.
- exit 1
-fi
-
-for p in $*; do
- if [ ! -f $BINDIR/$p ]; then
- echo $BINDIR/$p does not exist!
- else
- echo Removing $BINDIR/$p
- rm -f $BINDIR/$p
- if [ -f $BINDIR/$p ]; then
- echo Cannot remove $BINDIR/$p... does $USER have privileges?
- fi
- fi
-done
-
-
-cat << EOF
-======================================================================
-The binaries have been uninstalled. You may restore the binaries using
-the command "make installbin" or "make install" to install binaries,
-man pages and shell scripts. You can restore a previous version of the
-binaries (if there were any) using "make revert".
-======================================================================
-EOF
-
-exit 0
diff --git a/source/script/uninstallman.sh b/source/script/uninstallman.sh
deleted file mode 100755
index b4d4bfc1f92..00000000000
--- a/source/script/uninstallman.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#4 July 96 Dan.Shearer@UniSA.edu.au
-
-MANDIR=$1
-SRCDIR=$2
-
-echo Uninstalling man pages from $MANDIR
-
-for sect in 1 5 7 8 ; do
- for m in $MANDIR/man$sect ; do
- for s in $SRCDIR../docs/*$sect; do
- FNAME=$m/`basename $s`
- if test -f $FNAME; then
- echo Deleting $FNAME
- rm -f $FNAME
- test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges?
- else
- echo $FNAME does not exist! Check defines in the Makefile
- fi
- done
- done
-done
-
-cat << EOF
-======================================================================
-The man pages have been uninstalled. You may install them again using
-the command "make installman" or make "install" to install binaries,
-man pages and shell scripts.
-======================================================================
-EOF
-exit 0
diff --git a/source/script/uninstallscripts.sh b/source/script/uninstallscripts.sh
deleted file mode 100755
index ae907546f2e..00000000000
--- a/source/script/uninstallscripts.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-# 5 July 96 Dan.Shearer@UniSA.Edu.Au - almost identical to uninstallbin.sh
-
-INSTALLPERMS=$1
-BINDIR=$2
-
-shift
-shift
-
-if [ ! -d $BINDIR ]; then
- echo Directory $BINDIR does not exist!
- echo Do a "make installscripts" or "make install" first.
- exit 1
-fi
-
-for p in $*; do
- if [ ! -f $BINDIR/$p ]; then
- echo $BINDIR/$p does not exist!
- else
- echo Removing $BINDIR/$p
- rm -f $BINDIR/$p
- if [ -f $BINDIR/$p ]; then
- echo Cannot remove $BINDIR/$p... does $USER have privileges?
- fi
- fi
-done
-
-cat << EOF
-======================================================================
-The scripts have been uninstalled. You may reinstall them using
-the command "make installscripts" or "make install" to install binaries,
-man pages and shell scripts. You may recover a previous version (if any
-with "make revert".
-======================================================================
-EOF
-
-exit 0
diff --git a/source/script/updatesmbpasswd.sh b/source/script/updatesmbpasswd.sh
deleted file mode 100755
index 1d7e0d7332f..00000000000
--- a/source/script/updatesmbpasswd.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-nawk 'BEGIN {FS=":"}
-{
- if( $0 ~ "^#" ) {
- print $0
- } else if( (length($4) == 32) && (($4 ~ "^[0-9A-F]*$") || ($4 ~ "^[X]*$") || ( $4 ~ "^[*]*$"))) {
- print $0
- } else {
- printf( "%s:%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", $1, $2, $3);
- for(i = 4; i <= NF; i++)
- printf("%s:", $i)
- printf("\n")
- }
-}'