diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-02-12 22:56:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-02-12 22:56:15 +0000 |
commit | 9b5c7eb0fd809a8805c2432e0a5252972452fd12 (patch) | |
tree | 8b98ea794571e458c6636e6ee528eb09b02aaa5d | |
parent | 737538182c3cf21d6f7966724804a6ff0288b3d8 (diff) | |
download | drakx-backup-do-not-use-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar drakx-backup-do-not-use-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar.gz drakx-backup-do-not-use-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar.bz2 drakx-backup-do-not-use-9b5c7eb0fd809a8805c2432e0a5252972452fd12.tar.xz drakx-backup-do-not-use-9b5c7eb0fd809a8805c2432e0a5252972452fd12.zip |
cleanup starts_on_boot()
-rw-r--r-- | perl-install/services.pm | 18 |
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 ($) { |