diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-10-14 07:17:55 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-10-14 07:17:55 +0000 |
commit | 0f5eeb3e74ae8d053a267c96b0c86881aa1d398c (patch) | |
tree | cf572af74c6bd2c4266d2485d96e869abb6be1cf | |
parent | fbed47ae1a94f3f0e0fc2bd2ef74cc7df79055b5 (diff) | |
download | drakx-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar drakx-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar.gz drakx-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar.bz2 drakx-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.tar.xz drakx-0f5eeb3e74ae8d053a267c96b0c86881aa1d398c.zip |
simplify
-rw-r--r-- | perl-install/services.pm | 5 |
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 : |