summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-11-18 08:05:41 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-11-18 08:05:41 +0000
commit0f881eacc9dd3d36486097322c189d0737b56154 (patch)
tree39cb844678231df9c0e83661ef1f00d783426a55 /perl-install/standalone
parent7f7d2c8b9facf43f657214501cfe0aef8a3a5481 (diff)
downloaddrakx-0f881eacc9dd3d36486097322c189d0737b56154.tar
drakx-0f881eacc9dd3d36486097322c189d0737b56154.tar.gz
drakx-0f881eacc9dd3d36486097322c189d0737b56154.tar.bz2
drakx-0f881eacc9dd3d36486097322c189d0737b56154.tar.xz
drakx-0f881eacc9dd3d36486097322c189d0737b56154.zip
- standalone.pm :
o make it be 'use strict' aware o factorize options managment in one place - standalone tools : o they all now support -h|--help -v|--version, ... o they can add their own options to %standalone::usages - harddrake : use std --testing/$::testing rather than its own --test option
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/XFdrake13
-rwxr-xr-xperl-install/standalone/adduserdrake7
-rwxr-xr-xperl-install/standalone/diskdrake24
-rwxr-xr-xperl-install/standalone/drakautoinst2
-rwxr-xr-xperl-install/standalone/drakboot7
-rwxr-xr-xperl-install/standalone/drakconnect5
-rwxr-xr-xperl-install/standalone/drakfloppy3
-rwxr-xr-xperl-install/standalone/drakgw2
-rwxr-xr-xperl-install/standalone/draksound2
-rwxr-xr-xperl-install/standalone/drakxservices5
-rwxr-xr-xperl-install/standalone/drakxtv3
-rwxr-xr-xperl-install/standalone/keyboarddrake6
-rwxr-xr-xperl-install/standalone/livedrake6
-rwxr-xr-xperl-install/standalone/mousedrake7
-rwxr-xr-xperl-install/standalone/printerdrake13
15 files changed, 15 insertions, 90 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 1c803ccd5..5c8311d3d 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -35,17 +35,6 @@ local $_ = join '', @ARGV;
my ($configure_this) = grep { !/^-/ } @ARGV;
$configure_this ||= 'everything';
-/-h/ || $configure_this !~ /^(resolution|monitor|everything|auto_install)/ and die <<'EOF';
-usage: XFdrake [--expert] [--noauto] [--auto] [everything]
- XFdrake [--noauto] monitor
- XFdrake resolution
-EOF
-
-my $auto = /-auto/;
-$::expert = /-expert/;
-$::noauto = /-noauto/;
-$::testing = /-testing/;
-
begin:
{
my $in = 'interactive'->vnew('su', 'X');
@@ -68,7 +57,7 @@ begin:
if ($has_conf) {
Xconfig::main::configure_chooser($in, $raw_X, $in->do_pkgs, $options);
} else {
- Xconfig::main::configure_everything($in, $raw_X, $in->do_pkgs, $auto, $options);
+ Xconfig::main::configure_everything($in, $raw_X, $in->do_pkgs, $::auto, $options);
}
} elsif ($configure_this eq 'auto_install') {
Xconfig::main::configure_everything_auto_install(Xconfig::default::configure(), $in->do_pkgs, {}, $options);
diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake
index 98a2e3dd0..20268d9ff 100755
--- a/perl-install/standalone/adduserdrake
+++ b/perl-install/standalone/adduserdrake
@@ -8,13 +8,6 @@ use common;
use interactive;
use any;
-local $_ = join '', @ARGV;
-
-/-h/ and die "usage: adduserdrake [--beginner] [--expert] [<users...>]\n";
-
-$::beginner = /-beginner/;
-$::expert = /-expert/;
-
my @etc_pass_fields = qw(name pw uid gid realname home shell);
my @shells = grep { -x $_ } map { "/bin/$_" } qw(bash tcsh zsh ash ksh);
my $isMD5 = cat_("/etc/pam.d/system-auth") =~ /md5/;
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 1aa72a3df..a0b8cd158 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -36,18 +36,18 @@ use log;
use c;
-my %options;
-my @l = @ARGV;
-while (my $e = shift @l) {
- my ($option) = $e =~ /--?(.*)/ or next;
- if ($option =~ /(.*?)=(.*)/) {
- $options{$1} = $2;
- } else {
- $options{$option} = '';
- }
-}
-$::expert = defined(delete $options{expert});
-$::testing = defined(delete $options{testing});
+#my %options;
+#my @l = @ARGV;
+#while (my $e = shift @l) {
+" my ($option) = $e =~ /--?(.*)/ or next;
+# if ($option =~ /(.*?)=(.*)/) {
+# $options{$1} = $2;
+# } else {
+# $options{$option} = '';
+# }
+"}
+#$::expert = defined(delete $options{expert});
+#$::testing = defined(delete $options{testing});
my @types = qw(hd nfs smb dav removable fileshare);
my ($type, $para) = ('hd', '');
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
index 478850eeb..de6e2c8d0 100755
--- a/perl-install/standalone/drakautoinst
+++ b/perl-install/standalone/drakautoinst
@@ -29,8 +29,6 @@ use Data::Dumper;
local $_ = join '', @ARGV;
-/-h/ and die "usage: drakautoinst [--version]\n";
-/-version/ and die 'version: $Id$ '."\n";
$::direct = /-direct/;
$::direct = 1; #DEBUG
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 1aa1855e7..7054ed5db 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -13,13 +13,6 @@ use fsedit;
use fs;
use c;
-local $_ = join '', @ARGV;
-
-/-h/ and die "usage: drakboot [--expert] [--testing]\n";
-
-$::expert = /-expert/;
-$::testing = /-testing/;
-
my $in = 'interactive'->vnew('su', 'bootloader');
$::lilo_choice = \&lilo_choice;
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index a4930e616..5a9e897d8 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -36,11 +36,8 @@ use network::adsl;
use MDK::Common::Globals "network", qw($in $prefix $disconnect_file $connect_prog $connect_file $disconnect_file);
my $xpm_path = "/usr/share/libDrakX/pixmaps";
-$::isWizard = "@ARGV" =~ /--wizard/;
-$::expert = "@ARGV" =~ /--expert/;
local $_ = join '', @ARGV;
-
-#/-h/ and die "usage: drakconnect[--xf3] [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
+$::isWizard = /--wizard/;
my $netcnx = {};
my $netc = {};
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index a19e7889e..b173a9334 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -37,9 +37,6 @@ init Gtk;
Gtk->set_locale;
$in = 'interactive'->vnew('su', 'default');
-local $_ = join '', @ARGV;
-
-/-h/ and die N("usage: drakfloppy\n");
$expert_mode = 0;
# we have put here the list in order to do $list->clear() when we have to do
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index 357dfb2a2..488df9495 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -37,8 +37,6 @@ $::isInstall and die "Not supported during install.\n";
local $_ = join '', @ARGV;
-/-h/ and die "usage: drakgw [--version]\n";
-/-version/ and die 'version: $Id$ '."\n";
$::Wizard_pix_up = "wiz_drakgw.png";
$::Wizard_title = N("Internet Connection Sharing");
$::direct = /-direct/;
diff --git a/perl-install/standalone/draksound b/perl-install/standalone/draksound
index b8b5c519c..32acca45c 100755
--- a/perl-install/standalone/draksound
+++ b/perl-install/standalone/draksound
@@ -26,8 +26,6 @@ use common;
use harddrake::sound;
use modules;
-("@ARGV" =~ /--help|-h/) and die "usage: draksound [-h] [--help]\n";
-
my $in = 'interactive'->vnew();
modules::mergein_conf('/etc/modules.conf');
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
index a57b430bb..92fd34fe0 100755
--- a/perl-install/standalone/drakxservices
+++ b/perl-install/standalone/drakxservices
@@ -9,11 +9,6 @@ use interactive;
use services;
use log;
-local $_ = join '', @ARGV;
-
-/-h/ and die "usage: drakxservices\n";
-
-
my $in = 'interactive'->vnew('su', 'services');
begin:
my $l = services::ask($in);
diff --git a/perl-install/standalone/drakxtv b/perl-install/standalone/drakxtv
index 859a066d5..c0d76ea3d 100755
--- a/perl-install/standalone/drakxtv
+++ b/perl-install/standalone/drakxtv
@@ -29,9 +29,6 @@ use lang;
use log;
use common;
-("@ARGV" =~ /--help|-h/) and die "usage: drakxtv [-h] [--help] [--no-guess]\n";
-
-
my $in = 'interactive'->vnew();
sub scan4channels {
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake
index fd4559853..7e594f17b 100755
--- a/perl-install/standalone/keyboarddrake
+++ b/perl-install/standalone/keyboarddrake
@@ -11,12 +11,6 @@ use common;
use any;
use c;
-local $_ = join '', @ARGV;
-
-/-h/ and die N("usage: keyboarddrake [--expert] [keyboard]\n");
-
-$::expert = /-expert/;
-
my $in;
my $keyboard = keyboard::read();
if (my ($kb) = grep { !/^-/ } @ARGV) {
diff --git a/perl-install/standalone/livedrake b/perl-install/standalone/livedrake
index be4f9894a..03868c03b 100755
--- a/perl-install/standalone/livedrake
+++ b/perl-install/standalone/livedrake
@@ -9,12 +9,6 @@ use interactive;
use run_program;
use c;
-local $_ = join '', @ARGV;
-
-/-h/ and die "usage: livedrake [--testing]\n";
-
-$::testing = /-testing/;
-
my $in = 'interactive'->vnew('su', 'default');
my $cd_mntpoint = "/mnt/cdrom";
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index bf493e774..4ac16adcb 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -11,13 +11,6 @@ use mouse;
use c;
-local $_ = join '', @ARGV;
-
-/-h/ and die "usage: mousedrake [--auto] [--testing]\n";
-
-$::auto = /-auto/;
-$::testing = /-testing/;
-
my $in = 'interactive'->vnew('su', 'mouse');
modules::mergein_conf('/etc/modules.conf') if -r '/etc/modules.conf';
diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake
index 0369cd661..4f05e1ec2 100755
--- a/perl-install/standalone/printerdrake
+++ b/perl-install/standalone/printerdrake
@@ -30,18 +30,7 @@ use c;
local $_ = join '', @ARGV;
-/-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing] [--cups] [--lprng] [--lpd] [--pdq]\n";
-
-$::expert = 0;
-if (/-expert/) {
- $::expert = 1;
-} elsif (/-beginner/) {
- $::expert = 0;
-} else {
- printer::main::get_usermode ();
-}
-$::noauto = /-noauto/;
-$::testing = /-testing/;
+printer::main::get_usermode ();
my $printer;