summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakxservices
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-11-28 16:56:52 +0000
committerdamien <damien@mandriva.com>2000-11-28 16:56:52 +0000
commit0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7 (patch)
tree33f7ac905998f9ad6d85090f777ee4c0d0c67032 /perl-install/standalone/drakxservices
parentd5c526273db473a7d87a26000585900fc10dda7d (diff)
downloaddrakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.gz
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.bz2
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.xz
drakx-backup-do-not-use-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.zip
branch to build the firewall install.topic/unlabeled-1.1.1
Diffstat (limited to 'perl-install/standalone/drakxservices')
-rwxr-xr-xperl-install/standalone/drakxservices20
1 files changed, 5 insertions, 15 deletions
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
index 621def75f..63318a031 100755
--- a/perl-install/standalone/drakxservices
+++ b/perl-install/standalone/drakxservices
@@ -2,8 +2,10 @@
use lib qw(/usr/lib/libDrakX);
-use common qw(:common :functional);
+use common qw(:common :functional :file);
use interactive;
+use services;
+use log;
local $_ = join '', @ARGV;
@@ -12,19 +14,7 @@ local $_ = join '', @ARGV;
$::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;
+my $l = services::ask($in);
+services::doit($in, $l) if $l;
$in->exit(0);