summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>1998-07-06 22:25:56 +0000
committerRichard Sharpe <sharpe@samba.org>1998-07-06 22:25:56 +0000
commit52cf030b9d0ea4f3b68d7a3fccfe3841930a329a (patch)
tree211164461b96fa2541d05a899996e9be4caab2ae /source
parent04733f455dcc960387b5fd56c7bb443f233f66e2 (diff)
downloadsamba-52cf030b9d0ea4f3b68d7a3fccfe3841930a329a.tar.gz
samba-52cf030b9d0ea4f3b68d7a3fccfe3841930a329a.tar.xz
samba-52cf030b9d0ea4f3b68d7a3fccfe3841930a329a.zip
Digital UNIX does not seem to set OPTIND if there are no
command line parameters. Added simple code to smbtar to check for paramters and pump out a usage message if there are none. Regards Richard
Diffstat (limited to 'source')
-rw-r--r--source/script/smbtar10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/script/smbtar b/source/script/smbtar
index dcf01edb208..20422b03349 100644
--- a/source/script/smbtar
+++ b/source/script/smbtar
@@ -54,6 +54,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")