summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-12 22:56:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-12 22:56:15 +0000
commit9b5c7eb0fd809a8805c2432e0a5252972452fd12 (patch)
tree8b98ea794571e458c6636e6ee528eb09b02aaa5d /perl-install
parent737538182c3cf21d6f7966724804a6ff0288b3d8 (diff)
downloaddrakx-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar
drakx-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar.gz
drakx-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar.bz2
drakx-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar.xz
drakx-9b5c7eb0fd809a8805c2432e0a5252972452fd12.zip
cleanup starts_on_boot()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/services.pm18
1 files changed, 3 insertions, 15 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index f3aa02e49..4f46bbbe4 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -329,22 +329,10 @@ sub is_service_running ($) {
return (($? >> 8) != 0) ? 0 : 1;
}
-sub starts_on_boot ($) {
+sub starts_on_boot {
my ($service) = @_;
- local *F;
- open F, ($::testing ? $::prefix : "chroot $::prefix/ ") .
- "/bin/sh -c \"export LC_ALL=C; /sbin/chkconfig --list $service 2>&1\" |" or
- return 0;
- while (my $line = <F>) {
- chomp $line;
- if (($line =~ /:on/) || # service with init script
- ($line =~ /^\s*$service\s+on\s*$/)) { # xinetd service
- close F;
- return 1;
- }
- }
- close F;
- return 0;
+ my (undef, $on_services) = services($::prefix);
+ member($service, @$on_services);
}
sub start_service_on_boot ($) {