summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-21 17:59:09 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-21 17:59:09 +0000
commitc18552d7a02dfc62ce43160b58db8ad606085cee (patch)
treef61e497217998ebf66bc727ea95c8416d131144a /perl-install/standalone
parent00845c290fbfdf0015871323b10b3d90af613fca (diff)
downloaddrakx-c18552d7a02dfc62ce43160b58db8ad606085cee.tar
drakx-c18552d7a02dfc62ce43160b58db8ad606085cee.tar.gz
drakx-c18552d7a02dfc62ce43160b58db8ad606085cee.tar.bz2
drakx-c18552d7a02dfc62ce43160b58db8ad606085cee.tar.xz
drakx-c18552d7a02dfc62ce43160b58db8ad606085cee.zip
no_comment
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakxservices29
1 files changed, 3 insertions, 26 deletions
diff --git a/perl-install/standalone/drakxservices b/perl-install/standalone/drakxservices
index b551055d6..45270a7e7 100755
--- a/perl-install/standalone/drakxservices
+++ b/perl-install/standalone/drakxservices
@@ -1,9 +1,10 @@
#!/usr/bin/perl
-use lib qw(/usr/lib/libDrakX);
+use lib qw(.);#(/usr/lib/libDrakX);
use common qw(:common :functional :file);
use interactive;
+use services;
use log;
local $_ = join '', @ARGV;
@@ -12,30 +13,6 @@ local $_ = join '', @ARGV;
$::isStandalone = 1;
-my $in = vnew interactive('su');
-
-my @l = grep { !/\.rpm/ } map { chop; $_ } `cd /etc/rc.d/init.d ; grep -l "chkconfig:" *`;
-my @before = map { bool(@_ = glob("/etc/rc.d/rc*.d/S*$_")) } @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) {
- if ($after) {
- if (cat_("/etc/rc.d/init.d/$name") =~ /^chkconfig:\s+-/m) {
- system("chkconfig --add $name");
- } else {
- `/sbin/runlevel` =~ /\s(\d+)/ or die "bad runlevel";
- $1 == 3 || $1 == 5 or log::l("strange runlevel: ``$1'' (neither 3 nor 5)");
- system("chkconfig --level $1 $name on");
- }
- } else {
- system("chkconfig --del $name");
- }
- }
-} \@l, \@before, $after if $after;
+services::drakxservices(my $in = vnew interactive('su'));
$in->exit(0);