diff options
Diffstat (limited to 'source/script/smbtar')
-rw-r--r-- | source/script/smbtar | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/source/script/smbtar b/source/script/smbtar index fc032ed41cd..25c36b2a8f7 100644 --- a/source/script/smbtar +++ b/source/script/smbtar @@ -6,13 +6,17 @@ # and Ricky Poulten (ricky@logcam.co.uk) # # (May need to change shell to ksh for HPUX or OSF for better getopts) +# +# Richard Sharpe, added -c 'tarmode full' so that we back up all files to +# fix a bug in clitar when a patch was added to stop system and hidden files +# being backed up. case $0 in # when called by absolute path, assume smbclient is in the same directory /*) SMBCLIENT="`dirname $0`/smbclient";; - *) # edit this to show where your smbclient is - SMBCLIENT="./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 @@ -25,6 +29,7 @@ verbose="2>/dev/null" # Default: no echo to stdout log="-d 2" newer="" blocksize="" +clientargs="-c 'tarmode full'" tarcmd="c" tarargs="" cdcmd="\\" @@ -54,6 +59,16 @@ Options: (Description) (Default) exit $ex } +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 ... +if [ $# = 0 ]; then + + Usage 2 "Please enter a command line parameter!" + +fi + 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") @@ -88,7 +103,7 @@ while getopts rivl:b:d:N:s:p:x:u:Xt: c; do server="$OPTARG" ;; b) # specify [b]locksize - blocksize="blocksize $OPTARG" + blocksize="$OPTARG" case "$OPTARG" in [0-9]*) ;; *) echo >&2 "$0: Error, block size not numeric: -b $OPTARG" @@ -135,7 +150,6 @@ if [ -z "$verbose" ]; then fi eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ --E -N $log -D "'$cdcmd'" \ +-E -N $log -D "'$cdcmd'" ${clientargs} \ -T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose - |