summaryrefslogtreecommitdiff
path: root/source3/script/smbtar
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1999-12-13 13:27:58 +0000
committerAndrew Tridgell <tridge@samba.org>1999-12-13 13:27:58 +0000
commit3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7 (patch)
tree866dd15416c3d8554bb207709f433a87ad0c012d /source3/script/smbtar
parentf6276724bafdb6145c0c7b565172d80cb04516ea (diff)
downloadsamba-3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7.tar.gz
samba-3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7.tar.bz2
samba-3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7.zip
first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76780063dff23526c35408866d0c0154)
Diffstat (limited to 'source3/script/smbtar')
-rw-r--r--source3/script/smbtar11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/script/smbtar b/source3/script/smbtar
index f04eddc32b..cf3ff0ebe6 100644
--- a/source3/script/smbtar
+++ b/source3/script/smbtar
@@ -30,7 +30,9 @@ username=$LOGNAME # Default: same user name as in *nix
verbose="2>/dev/null" # Default: no echo to stdout
log="-d 2"
newer=""
+newerarg=""
blocksize=""
+blocksizearg=""
clientargs="-c 'tarmode full'"
tarcmd="c"
tarargs=""
@@ -62,7 +64,7 @@ Options: (Description) (Default)
exit $ex
}
-echo Params count: $#
+# echo Params count: $#
# DEC OSF AKA Digital UNIX does not seem to return a value in OPTIND if
# there are no command line params, so protect us against that ...
@@ -97,7 +99,7 @@ while getopts riavl:b:d:N:s:p:x:u:Xt: c; do
N) # compare with a file, test if [n]ewer
if [ -f $OPTARG ]; then
newer=$OPTARG
- tarargs=${tarargs}N
+ newerarg="N"
else
echo >&2 $0: Warning, $OPTARG not found
fi
@@ -115,7 +117,7 @@ while getopts riavl:b:d:N:s:p:x:u:Xt: c; do
*) echo >&2 "$0: Error, block size not numeric: -b $OPTARG"
exit 1
esac
- tarargs=${tarargs}b
+ blocksizearg="b"
;;
p) # specify [p]assword to use
password="$OPTARG"
@@ -155,7 +157,8 @@ if [ -z "$verbose" ]; then
echo "blocksize is $blocksize"
fi
+tarargs=${tarargs}${blocksizearg}${newerarg}
+
eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \
-E -N $log -D "'$cdcmd'" ${clientargs} \
-T${tarcmd}${tarargs} $blocksize $newer $tapefile '${1+"$@"}' $verbose
-