summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakxservices
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /perl-install/standalone/drakxservices
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'perl-install/standalone/drakxservices')
-rwxr-xr-xperl-install/standalone/drakxservices20
1 files changed, 15 insertions, 5 deletions
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
index 63318a031..621def75f 100755
--- a/perl-install/standalone/drakxservices
+++ b/perl-install/standalone/drakxservices
@@ -2,10 +2,8 @@
use lib qw(/usr/lib/libDrakX);
-use common qw(:common :functional :file);
+use common qw(:common :functional);
use interactive;
-use services;
-use log;
local $_ = join '', @ARGV;
@@ -14,7 +12,19 @@ local $_ = join '', @ARGV;
$::isStandalone = 1;
my $in = vnew interactive('su');
-my $l = services::ask($in);
-services::doit($in, $l) if $l;
+
+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);