summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-14 07:17:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-14 07:17:55 +0000
commit0f5eeb3e74ae8d053a267c96b0c86881aa1d398c (patch)
treecf572af74c6bd2c4266d2485d96e869abb6be1cf /perl-install/services.pm
parentfbed47ae1a94f3f0e0fc2bd2ef74cc7df79055b5 (diff)
downloaddrakx-backup-do-not-use-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar
drakx-backup-do-not-use-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar.gz
drakx-backup-do-not-use-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar.bz2
drakx-backup-do-not-use-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar.xz
drakx-backup-do-not-use-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.zip
simplify
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r--perl-install/services.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index e3d799bf9..1e2a32fc4 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -95,9 +95,8 @@ xfs => N_("Starts the X Font Server (this is mandatory for Xorg to run)."),
if ($s) {
$s = translate($s);
} else {
- $s = -e "$::prefix/etc/rc.d/init.d/$name" && cat_("$::prefix/etc/rc.d/init.d/$name");
- $s ||= -e "$::prefix/etc/init.d/$name" && cat_("$::prefix/etc/init.d/$name");
- $s ||= -e "$::prefix/etc/xinetd.d/$name" && cat_("$::prefix/etc/xinetd.d/$name");
+ my $file = find { -e $_ } map { "$::prefix$_/$name" } '/etc/rc.d/init.d', '/etc/init.d', '/etc/xinetd.d';
+ $s = cat_($file);
$s =~ s/\\\s*\n#\s*//mg;
$s =
$s =~ /^# description:\s+(.*?)^(?:[^#]|# {0,2}\S)/sm ? $1 :