diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-10 00:33:11 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-10 00:33:11 +0000 |
commit | 1883acd25096f34779cce40ebba76c5860964f0d (patch) | |
tree | 8f977a481321620d53a4af0d9e48a1898d481397 /perl-install/standalone | |
parent | 1bd398a1b3eae79192e9c0fce06173ec195caf69 (diff) | |
download | drakx-1883acd25096f34779cce40ebba76c5860964f0d.tar drakx-1883acd25096f34779cce40ebba76c5860964f0d.tar.gz drakx-1883acd25096f34779cce40ebba76c5860964f0d.tar.bz2 drakx-1883acd25096f34779cce40ebba76c5860964f0d.tar.xz drakx-1883acd25096f34779cce40ebba76c5860964f0d.zip |
use standalone and standalone::pkgs_install
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/XFdrake | 11 | ||||
-rwxr-xr-x | perl-install/standalone/adduserdrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/diskdrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakboot | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakgw | 14 | ||||
-rwxr-xr-x | perl-install/standalone/draknet | 10 | ||||
-rwxr-xr-x | perl-install/standalone/draksec | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakxconf | 3 | ||||
-rwxr-xr-x | perl-install/standalone/drakxservices | 2 | ||||
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/livedrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/mousedrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/printerdrake | 6 |
13 files changed, 23 insertions, 37 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index 88db4c23d..4af9d8aaa 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -20,6 +20,7 @@ use lib qw(/usr/lib/libDrakX); use interactive; +use standalone; use Xconfigurator; use Xconfig; use c; @@ -30,7 +31,6 @@ local $_ = join '', @ARGV; my $i = {}; -$::isStandalone = 1; $::force_xf3 = /-xf3/; $::beginner = /-beginner/; $::expert = /-expert/; @@ -42,7 +42,7 @@ $i->{skiptest} = /-skiptest/; my $in = interactive->vnew('su'); my $f = "/usr/X11R6/lib/X11/Cards"; -if (!-e $f) { $in->suspend; system("urpmi --auto --best-output XFree86 XFree86-75dpi-fonts"); $in->resume; } +if (! -e $f) standalone::pkgs_install('XFree86', 'XFree86-75dpi-fonts'); -e $f or die "install XFree86 first!\n"; `pidof xfs` > 0 or system("/etc/rc.d/init.d/xfs start"); @@ -52,10 +52,5 @@ system("mount /proc 2>/dev/null"); # ensure /proc is mounted for pci probing Xconfig::getinfoFromXF86Config($i) if $0 =~ Xdrakres; Xconfig::getinfo($i); -Xconfigurator::main('', $i, $in, 0, -e "/etc/pcmcia", - sub { my ($server, @l) = @_; - $in->suspend; - system("urpmi --auto --best-output XFree86-$server " . join(' ', @l)); - $in->resume; - }); +Xconfigurator::main('', $i, $in, 0, -e "/etc/pcmcia", \&standalone::pkgs_install); $in->exit(0); diff --git a/perl-install/standalone/adduserdrake b/perl-install/standalone/adduserdrake index 18ee80c2b..7660e934e 100755 --- a/perl-install/standalone/adduserdrake +++ b/perl-install/standalone/adduserdrake @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:common :functional :system :file); use interactive; +use standalone; use any; local $_ = join '', @ARGV; @@ -12,7 +13,6 @@ local $_ = join '', @ARGV; $::beginner = /-beginner/; $::expert = /-expert/; -$::isStandalone = 1; my @etc_pass_fields = qw(name pw uid gid realname home shell); my @shells = grep { -x $_ } map { "/bin/$_" } qw(bash tcsh zsh ash ksh); diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 6696f29f4..1902069c8 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -25,6 +25,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:common :functional); use diskdrake; +use standalone; use interactive_gtk; use detect_devices; use fsedit; @@ -38,7 +39,6 @@ local $_ = join '', @ARGV; $::expert = /-expert/; $::testing = /-testing/; -$::isStandalone = 1; if ($>) { $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index b5656dc4a..48cbd406a 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:common :file :functional); use interactive; +use standalone; use any; use bootloader; use detect_devices; @@ -16,7 +17,6 @@ local $_ = join '', @ARGV; /-h/ and die "usage: drakboot [--expert]\n"; $::expert = /-expert/; -$::isStandalone = 1; my $in = interactive->vnew('su'); diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index f8e1a5cb3..ca4a75058 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -17,6 +17,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:system :file); use interactive; +use standalone; use log; use c; use netconnect; @@ -29,7 +30,6 @@ local $_ = join '', @ARGV; $::verbose = /-verbose/; $::direct = /-direct/; -$::isStandalone = 1; my $in = vnew interactive('su'); @@ -86,13 +86,6 @@ sub stop_daemons() close DRAKGW_SETUP; } -sub install_rpm($) -{ - $in->suspend; - system("urpmi --auto --best-output $_[0]"); - $in->resume; -} - sub fatal_quit($) { log::l("[drakgw] FATAL: $_[0]\n"); @@ -322,7 +315,7 @@ my %bin2rpm = ( "/sbin/ipchains" => "ipchains", "/var/named/named.local" => "caching-nameserver" ); -e $_ or $rpms_to_install .= "$bin2rpm{$_} " foreach (keys %bin2rpm); -install_rpm($rpms_to_install); +standalone::pkgs_install($rpms_to_install); -e $_ or fatal_quit(_("Problems installing package $bin2rpm{$_}")) foreach (keys %bin2rpm); @@ -549,6 +542,9 @@ $in->exit(0); #------------------------------------------------- #- $Log$ +#- Revision 1.19 2001/01/10 00:32:42 prigaux +#- use standalone and standalone::pkgs_install +#- #- Revision 1.18 2000/12/16 16:13:34 prigaux #- use ldetect-lst #- diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet index 38194c3dd..b663472d1 100755 --- a/perl-install/standalone/draknet +++ b/perl-install/standalone/draknet @@ -21,6 +21,7 @@ use lib qw(/usr/lib/libDrakX); use interactive; +use standalone; use netconnect; use c; @@ -30,7 +31,6 @@ local $_ = join '', @ARGV; my $netcnx = {}; -$::isStandalone = 1; $::isWizard = 0; $::wizard_xpm = "/usr/share/pixmaps/internet.xpm"; #$::force_xf3 = /-xf3/; @@ -47,10 +47,6 @@ $::wizard_xpm = "/usr/share/pixmaps/internet.xpm"; my $in = vnew interactive('su'); -$::isStandalone and my $wait=$in->wait_message('', "", 1); -netconnect::intro('', $netcnx, $in, -e "/etc/pcmcia", sub { - $in->suspend; - system("urpmi --auto --best-output " . join(' ', @_)); - $in->resume; - }); +my $wait = $in->wait_message('', '', 1); +netconnect::intro('', $netcnx, $in, -e "/etc/pcmcia", \&standalone::pkgs_install); $in->exit(0); diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec index 4dff6de7b..1cca5447d 100755 --- a/perl-install/standalone/draksec +++ b/perl-install/standalone/draksec @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:system :file); use interactive; +use standalone; use mouse; use c; @@ -12,7 +13,6 @@ local $_ = join '', @ARGV; /-h/ and die "usage: draksec [--expert]\n"; $::expert = /-expert/ || cat_("/etc/sysconfig/system") =~ /^CLASS="?expert/m; #" -$::isStandalone = 1; my $in = vnew interactive('su'); diff --git a/perl-install/standalone/drakxconf b/perl-install/standalone/drakxconf index e4e4e9bd3..d4337e9fb 100755 --- a/perl-install/standalone/drakxconf +++ b/perl-install/standalone/drakxconf @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use interactive; +use standalone; use keyboard; use Xconfigurator_consts; use common qw(:system); @@ -13,8 +14,6 @@ local $_ = join '', @ARGV; /-h/ and die "usage: drakxconf\n"; -$::isStandalone = 1; - my $in = vnew interactive('su'); my $choice = $in->ask_from_list("drakxconf", diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices index 63318a031..b5b830bad 100755 --- a/perl-install/standalone/drakxservices +++ b/perl-install/standalone/drakxservices @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:common :functional :file); use interactive; +use standalone; use services; use log; @@ -11,7 +12,6 @@ local $_ = join '', @ARGV; /-h/ and die "usage: drakxservices\n"; -$::isStandalone = 1; my $in = vnew interactive('su'); my $l = services::ask($in); diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index 33c1862a1..01f99809d 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -5,6 +5,7 @@ use lib qw(/usr/lib/libDrakX); use interactive; use keyboard; +use standalone; use Xconfigurator_consts; use common qw(:system); use c; @@ -14,7 +15,6 @@ local $_ = join '', @ARGV; /-h/ and die _("usage: keyboarddrake [--expert] [keyboard]\n"); $::expert = /-expert/; -$::isStandalone = 1; my ($keyboard) = grep { !/^-/ } @ARGV; diff --git a/perl-install/standalone/livedrake b/perl-install/standalone/livedrake index f93cfefbb..664f7b897 100755 --- a/perl-install/standalone/livedrake +++ b/perl-install/standalone/livedrake @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:common :system :file); use interactive; +use standalone; use run_program; use c; @@ -12,7 +13,6 @@ local $_ = join '', @ARGV; /-h/ and die "usage: livedrake [--testing]\n"; $::testing = /-testing/; -$::isStandalone = 1; my $in = vnew interactive('su'); diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index 27bbc8f9a..1769007dd 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -4,6 +4,7 @@ use lib qw(/usr/lib/libDrakX); use common qw(:common :system); use interactive; +use standalone; use detect_devices; use mouse; use c; @@ -15,7 +16,6 @@ local $_ = join '', @ARGV; $::auto = /-auto/; $::testing = /-testing/; -$::isStandalone = 1; my $in = vnew interactive('su'); diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index cee224da9..0ad84058c 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -21,8 +21,9 @@ use lib qw(/usr/lib/libDrakX); use interactive; -use printer; +use standalone; use printerdrake; +use printer; use c; local $_ = join '', @ARGV; @@ -35,7 +36,6 @@ $::auto = /-auto/; $::noauto = /-noauto/; $::skiptest = /-skiptest/; $::testing = /-testing/; -$::isStandalone = 1; my $printer; eval { $printer = printer::getinfo('') }; /-lpr/ and $printer->{mode} = 'lpr'; @@ -44,6 +44,6 @@ $printer->{mode} ||= 'CUPS'; #- assume this default if nothing found. my $in = vnew interactive('su'); -printerdrake::main($printer, $in, sub { $in->suspend; system("urpmi --auto --best-output " . join(' ', @_)); $in->resume; }); +printerdrake::main($printer, $in, sub { $in->standalone::pkgs_install(@_) }); $in->exit(0); |