diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-05-03 14:21:34 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-05-03 14:21:34 +0000 |
commit | f9df61e55cd55571923eaa5be8a04ab5ae87fd22 (patch) | |
tree | 6ed8cdfad01424be5fbf2f3838fbb117ee72fffb /perl-install/services.pm | |
parent | f4017ea2f9cf2452120b8bd072b5c03ef61784c9 (diff) | |
download | drakx-backup-do-not-use-f9df61e55cd55571923eaa5be8a04ab5ae87fd22.tar drakx-backup-do-not-use-f9df61e55cd55571923eaa5be8a04ab5ae87fd22.tar.gz drakx-backup-do-not-use-f9df61e55cd55571923eaa5be8a04ab5ae87fd22.tar.bz2 drakx-backup-do-not-use-f9df61e55cd55571923eaa5be8a04ab5ae87fd22.tar.xz drakx-backup-do-not-use-f9df61e55cd55571923eaa5be8a04ab5ae87fd22.zip |
no_comment
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r-- | perl-install/services.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm index d43867268..4f3c1d81f 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -95,12 +95,14 @@ sub drakxservices { mapn { my ($name, $before, $after) = @_; if ($before != $after) { + my $script = "/etc/rc.d/init.d/$name"; run_program::rooted($prefix, "chkconfig", $after ? "--add" : "--del", $name); - if ($after && cat_("$prefix/etc/rc.d/init.d/$name") =~ /^#\s+chkconfig:\s+-/m) { - #- `/sbin/runlevel` =~ /\s(\d+)/ or die "bad runlevel"; - #- $1 == 3 || $1 == 5 or log::l("strange runlevel: ``$1'' (neither 3 nor 5)"); + if ($after && cat_("$prefix$script") =~ /^#\s+chkconfig:\s+-/m) { run_program::rooted($prefix, "chkconfig", "--level", "35", $name, "on"); } + if (!$after && $::isStandalone) { + run_program::rooted($prefix, $script, "stop"); + } } } \@l, \@before, $after; } |