summaryrefslogtreecommitdiff
path: root/source3
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
commit5b11dbd8f66040de091b705a5814566e029a6fa6 (patch)
tree59515a3bf2af25e2c4d7c4b5ded368ca5d0d39fa /source3
parentc21805ff38c451f9b82449fdf4817a01cf65db41 (diff)
downloadsamba-5b11dbd8f66040de091b705a5814566e029a6fa6.tar.gz
samba-5b11dbd8f66040de091b705a5814566e029a6fa6.tar.bz2
samba-5b11dbd8f66040de091b705a5814566e029a6fa6.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 (This used to be commit 52cf030b9d0ea4f3b68d7a3fccfe3841930a329a)
Diffstat (limited to 'source3')
-rw-r--r--source3/script/smbtar10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/script/smbtar b/source3/script/smbtar
index dcf01edb20..20422b0334 100644
--- a/source3/script/smbtar
+++ b/source3/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")