diff options
author | damien <damien@mandriva.com> | 2001-02-08 10:11:37 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2001-02-08 10:11:37 +0000 |
commit | aca4c306be5e8d757fbac86c9de3f6f3862cc471 (patch) | |
tree | 3f63882e84775916b5aea7a54a2ad142dfc567d8 | |
parent | 842c74ed3d9e2396cf1fb85f14e34258bbd13cd6 (diff) | |
download | drakx-backup-do-not-use-aca4c306be5e8d757fbac86c9de3f6f3862cc471.tar drakx-backup-do-not-use-aca4c306be5e8d757fbac86c9de3f6f3862cc471.tar.gz drakx-backup-do-not-use-aca4c306be5e8d757fbac86c9de3f6f3862cc471.tar.bz2 drakx-backup-do-not-use-aca4c306be5e8d757fbac86c9de3f6f3862cc471.tar.xz drakx-backup-do-not-use-aca4c306be5e8d757fbac86c9de3f6f3862cc471.zip |
implemented or updated embedded mode
-rwxr-xr-x | perl-install/standalone/XFdrake | 7 | ||||
-rwxr-xr-x | perl-install/standalone/diskdrake | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakboot | 2 | ||||
-rwxr-xr-x | perl-install/standalone/drakgw | 5 | ||||
-rwxr-xr-x | perl-install/standalone/draknet | 8 | ||||
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 12 | ||||
-rwxr-xr-x | perl-install/standalone/mousedrake | 5 | ||||
-rwxr-xr-x | perl-install/standalone/printerdrake | 5 |
8 files changed, 33 insertions, 13 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake index a7e3c3249..7c3a5d13b 100755 --- a/perl-install/standalone/XFdrake +++ b/perl-install/standalone/XFdrake @@ -25,6 +25,8 @@ use Xconfigurator; use Xconfig; use c; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; + local $_ = join '', @ARGV; /-h/ and die "usage: XFdrake [--xf3] [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n"; @@ -39,6 +41,7 @@ $::noauto = /-noauto/; $::testing = /-testing/; $i->{skiptest} = /-skiptest/; +begin: my $in = interactive->vnew('su'); my $f = "/usr/X11R6/lib/X11/Cards"; @@ -53,4 +56,6 @@ Xconfig::getinfoFromXF86Config($i) if $0 =~ Xdrakres; Xconfig::getinfo($i); Xconfigurator::main('', $i, $in, 0, \&standalone::pkgs_install); -$in->exit(0); +!$::isEmbedded and $in->exit(0); +kill(USR1, $::CCPID); +#goto begin; diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 4ecab2b75..bb3fb9197 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -33,7 +33,7 @@ use fs; use log; use c; -$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\S*) (\S*)/; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; print "EMBED\n" if $::isEmbedded; print "XID : $::XID\n"; diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index 3b8862552..277688a58 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -12,7 +12,7 @@ use fsedit; use fs; use c; -$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\S*) (\S*)/; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; local $_ = join '', @ARGV; /-h/ and die "usage: drakboot [--expert]\n"; diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index cdacba7fc..f3ba6c855 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -23,7 +23,7 @@ use c; use netconnect; use detect_devices; -$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\S*) (\S*)/; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; $::isWizard = "@ARGV" =~ /--wizard/; local $_ = join '', @ARGV; @@ -552,6 +552,9 @@ sub quit_global { #------------------------------------------------- #- $Log$ +#- Revision 1.21 2001/02/08 10:11:37 damien +#- implemented or updated embedded mode +#- #- Revision 1.20 2001/02/08 07:00:41 damien #- added embedded and (ugly) wizard mode. #- diff --git a/perl-install/standalone/draknet b/perl-install/standalone/draknet index d2023aac9..d7a0af9d9 100755 --- a/perl-install/standalone/draknet +++ b/perl-install/standalone/draknet @@ -28,7 +28,7 @@ use standalone; use netconnect; use c; -$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\S*) (\S*)/; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; $::isWizard = "@ARGV" =~ /--wizard/; print "EMBED\n" if $::isEmbedded; print "XID : $::XID\n"; @@ -142,7 +142,7 @@ my $bbox1 = new Gtk::HButtonBox; $vbox1->pack_start($bbox1,0,0,0); $bbox1->set_layout(-end); my $button_ok = new Gtk::Button "OK"; -$button_ok->signal_connect ( clicked => sub { kill(USR1, $::CCPID) }); +$button_ok->signal_connect ( clicked => sub { $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0); }); $bbox1->add($button_ok); my $button_cancel = new Gtk::Button "Cancel"; $button_cancel->signal_connect ( clicked => sub { @@ -152,7 +152,7 @@ $button_cancel->signal_connect ( clicked => sub { $label_host->set ($h); $label4->set($netcnx->{type}); $label6->set($netcnx->{type} eq 'lan' ? $netc->{GATEWAY} : $netc->{NET_INTERFACE}); - kill(USR1, $::CCPID); + $::isEmbedded ? kill(USR1, $::CCPID) : Gtk->exit(0); }); $bbox1->add($button_cancel); @@ -161,7 +161,7 @@ Gtk->main; dd: -netconnect::intro('', $netcnx, $in, -e "/etc/pcmcia", sub {});#\&standalone::pkgs_install); +netconnect::intro('', $netcnx, $in, -e "/etc/pcmcia", \&standalone::pkgs_install); $in->exit(0); sub configure_net { diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index 01f99809d..da23cdc28 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -10,16 +10,20 @@ use Xconfigurator_consts; use common qw(:system); use c; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; local $_ = join '', @ARGV; /-h/ and die _("usage: keyboarddrake [--expert] [keyboard]\n"); $::expert = /-expert/; -my ($keyboard) = grep { !/^-/ } @ARGV; - +print "[$::expert]\n"; +my $keyboard=''; +if ($::expert) { ($keyboard) = grep { !/^-/ } @ARGV;} +print "[$keyboard]\n"; my $in = interactive->vnew('su'); +begin: $keyboard ||= $in->ask_from_listf_(_("Keyboard"), _("Please, choose your keyboard layout."), \&keyboard::keyboard2text, @@ -57,4 +61,6 @@ substInFile { keyboard::write('', $keyboard, $isNotDelete); -$in->exit(0); +$::isEmbedded ? kill(USR1, $::CCPID) : $in->exit(0); +$keyboard=''; +goto begin; diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index 1769007dd..aff16a1b6 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -10,6 +10,7 @@ use mouse; use c; require 'dumpvar.pl'; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; local $_ = join '', @ARGV; /-h/ and die "usage: mousedrake [--auto] [--testing]\n"; @@ -19,6 +20,7 @@ $::testing = /-testing/; my $in = vnew interactive('su'); +begin: my ($mouse) = mouse::detect() unless $::noauto; if (!$mouse || !$::auto) { @@ -45,4 +47,5 @@ $o->{mouse}{device} = dumpValue(\$mouse); mouse::write_conf($mouse); -$in->exit(0); +$::isEmbedded ? kill(USR1, $::CCPID) : $in->exit(0); +goto begin; diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake index 0ad84058c..0a3fbcf2f 100755 --- a/perl-install/standalone/printerdrake +++ b/perl-install/standalone/printerdrake @@ -26,6 +26,7 @@ use printerdrake; use printer; use c; +$::isEmbedded = ($::XID, $::CCPID) = "@ARGV" =~ /--embedded (\w+) (\w+)/; local $_ = join '', @ARGV; /-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n"; @@ -44,6 +45,8 @@ $printer->{mode} ||= 'CUPS'; #- assume this default if nothing found. my $in = vnew interactive('su'); +begin: printerdrake::main($printer, $in, sub { $in->standalone::pkgs_install(@_) }); -$in->exit(0); +$::isEmbedded ? kill(USR1, $::CCPID) : $in->exit(0); +goto begin; |