summaryrefslogtreecommitdiffstats
path: root/mdkonline
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-04-03 13:58:26 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-04-03 13:58:26 +0000
commitff64e5a3f3384720e1ef3b054983d6520100e4cf (patch)
treec914fc4c6c5b91b10302191be1444d688c1e410e /mdkonline
parent5e346ffb67f77309898bacabeeba9a3d51516549 (diff)
downloadmgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar
mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar.gz
mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar.bz2
mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.tar.xz
mgaonline-ff64e5a3f3384720e1ef3b054983d6520100e4cf.zip
add a usage message
Diffstat (limited to 'mdkonline')
-rwxr-xr-xmdkonline22
1 files changed, 21 insertions, 1 deletions
diff --git a/mdkonline b/mdkonline
index ff4a8291..2e5581d0 100755
--- a/mdkonline
+++ b/mdkonline
@@ -49,7 +49,27 @@ my @info;
$ia = 1;
-GetOptions('interactive!' => \$ia, 'login=s' => \$login, 'pass=s' => \$password, 'box=s' => \$boxname, 'country:s' => \$country);
+
+sub usage() {
+ print STDERR N("mdonline version %s
+Copyright (C) %s Mandriva.
+This is free software and may be redistributed under the terms of the GNU GPL.
+
+usage:
+", 1, 2006) . N(" --help - print this help message.
+") . N(" --box= - hostname.
+") . N(" --country - name of country of the user.
+") . N(" --interactive - use the interactive mode.
+") . N(" --nointeractive - use the non-interactive mode.
+") . N(" --login= - login name of the user.
+") . N(" --pass= - password of the user.
+");
+ exit(0);
+}
+
+GetOptions('interactive!' => \$ia, 'login=s' => \$login, 'pass=s' => \$password, 'box=s' => \$boxname, 'country:s' => \$country,
+ 'help' => \&usage,
+ );
my $in = interactive->vnew('su') if $ia;