summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-12-09 00:52:32 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-12-09 00:52:32 +0000
commitd59b27d5fcc346d96072ed0edb88cda0223be084 (patch)
treef605bc19591d3cf23d372a5ace6c70fbe367a620 /perl-install/standalone
parent1934b3123c81c2ccb425626aa61ed29e38780ddf (diff)
downloaddrakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.gz
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.bz2
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.tar.xz
drakx-backup-do-not-use-d59b27d5fcc346d96072ed0edb88cda0223be084.zip
no_comment
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/XFdrake5
-rwxr-xr-xperl-install/standalone/diskdrake3
-rwxr-xr-xperl-install/standalone/drakxconf27
-rwxr-xr-xperl-install/standalone/drakxservices30
-rwxr-xr-xperl-install/standalone/keyboarddrake5
-rwxr-xr-xperl-install/standalone/mousedrake5
-rwxr-xr-xperl-install/standalone/printerdrake5
7 files changed, 71 insertions, 9 deletions
diff --git a/perl-install/standalone/XFdrake b/perl-install/standalone/XFdrake
index 28864acc1..f4d4cb263 100755
--- a/perl-install/standalone/XFdrake
+++ b/perl-install/standalone/XFdrake
@@ -22,6 +22,7 @@ use lib qw(/usr/lib/libDrakX);
use interactive;
use Xconfigurator;
use Xconfig;
+use c;
local $_ = join '', @ARGV;
@@ -35,8 +36,8 @@ $::skiptest = /--skiptest/;
$::testing = /--testing/;
$::isStandalone = 1;
-my $in = vnew interactive;
+my $in = vnew interactive('su');
Xconfigurator::main('', Xconfig::getinfo(), $in, 0, sub { `urpmi --auto XFree86-$_[0]` });
-exec 'true' if ref($in) =~ /gtk/; #- workaround for perl-GTK
+$in->exit(0);
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index 1a9bba3c3..036fa500a 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -30,6 +30,7 @@ use detect_devices;
use fsedit;
use fs;
use log;
+use c;
local $_ = join '', @ARGV;
@@ -68,4 +69,4 @@ fs::get_mntpoints_from_fstab($fstab);
fs::check_mounted($fstab);
diskdrake::main($hds, {}, $in);
-exec "true";
+$in->exit(0);
diff --git a/perl-install/standalone/drakxconf b/perl-install/standalone/drakxconf
new file mode 100755
index 000000000..f4adb9989
--- /dev/null
+++ b/perl-install/standalone/drakxconf
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+
+use interactive;
+use keyboard;
+use Xconfigurator_consts;
+use common qw(:system);
+use c;
+
+local $_ = join '', @ARGV;
+
+/-h/ and die "usage: draxconf\n";
+
+$::isStandalone = 1;
+
+my $in = vnew interactive('su');
+
+my $choice = $in->ask_from_list("drakxconf",
+_("Choose the tool you want to use"),
+[ grep { my $prog = $_; int grep { -x "$_/$prog" } split ":", $ENV{PATH} }
+ qw(XFdrake diskdrake keyboarddrake mousedrake netdrake printerdrake ) ]) or c::_exit(0); #- workaround for perl-GTK
+
+$in->end;
+
+exec $choice, @ARGV or $in->exit(1);
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
new file mode 100755
index 000000000..621def75f
--- /dev/null
+++ b/perl-install/standalone/drakxservices
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use lib qw(/usr/lib/libDrakX);
+
+use common qw(:common :functional);
+use interactive;
+
+local $_ = join '', @ARGV;
+
+/-h/ and die "usage: drakxservices\n";
+
+$::isStandalone = 1;
+
+my $in = vnew interactive('su');
+
+my @l = map { chop; $_ } `cd /etc/rc.d/init.d ; grep -l "chkconfig:" *`;
+my @before = map { bool(@_ = glob("/etc/rc.d/rc*.d/*$_")) } @l;
+
+my $after = $in->ask_many_from_list("drakxservices",
+_("Choose which services should be automatically started at boot time"),
+ \@l, \@before);
+
+mapn {
+ my ($name, $before, $after) = @_;
+ if ($before != $after) {
+ system("chkconfig", $after ? "--add" : "--del", $name);
+ }
+} \@l, \@before, $after;
+
+$in->exit(0);
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake
index 9bb77e6bb..96d345ae6 100755
--- a/perl-install/standalone/keyboarddrake
+++ b/perl-install/standalone/keyboarddrake
@@ -7,6 +7,7 @@ use interactive;
use keyboard;
use Xconfigurator_consts;
use common qw(:system);
+use c;
local $_ = join '', @ARGV;
@@ -15,7 +16,7 @@ local $_ = join '', @ARGV;
$::expert = /--expert/;
$::isStandalone = 1;
-my $in = vnew interactive;
+my $in = vnew interactive('su');
my $keyboard = keyboard::text2keyboard(
$in->ask_from_list_(_("Keyboard"),
@@ -42,4 +43,4 @@ substInFile {
keyboard::write('', $keyboard, $isNotDelete);
-exec 'true' if ref($in) =~ /gtk/; #- workaround for perl-GTK
+$in->exit(0);
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index daacb90e9..748f5761d 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -5,6 +5,7 @@ use lib qw(/usr/lib/libDrakX);
use common qw(:system);
use interactive;
use mouse;
+use c;
local $_ = join '', @ARGV;
@@ -15,7 +16,7 @@ $::noauto = /--noauto/;
$::testing = /--testing/;
$::isStandalone = 1;
-my $in = vnew interactive;
+my $in = vnew interactive('su');
my $mouse = mouse::detect() unless $::noauto;
@@ -48,4 +49,4 @@ substInFile {
}
} $f if -e $f && !$::testing;
-exec 'true' if ref($in) =~ /gtk/; #- workaround for perl-GTK
+$in->exit(0);
diff --git a/perl-install/standalone/printerdrake b/perl-install/standalone/printerdrake
index 3ccd01311..6f5a03218 100755
--- a/perl-install/standalone/printerdrake
+++ b/perl-install/standalone/printerdrake
@@ -22,6 +22,7 @@ use lib qw(/usr/lib/libDrakX);
use interactive;
use printerdrake;
+use c;
local $_ = join '', @ARGV;
@@ -35,8 +36,8 @@ $::skiptest = /--skiptest/;
$::testing = /--testing/;
$::isStandalone = 1;
-my $in = vnew interactive;
+my $in = vnew interactive('su');
printerdrake::main('', printerdrake::getinfo(''), $in, sub { `urpmi --auto $_[0]` });
-exec 'true' if ref($in) =~ /gtk/; #- workaround for perl-GTK
+$in->exit(0);