aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xadd-service4
1 files changed, 3 insertions, 1 deletions
diff --git a/add-service b/add-service
index 6314c76..04eb865 100755
--- a/add-service
+++ b/add-service
@@ -139,7 +139,8 @@ add_service() {
# the legacy init script will not be enabled.
# In order to enable switching back ot sysvinit, we should enable the
# sysvinit scripts too.
- if [ -n "$srv" -a -f /etc/rc.d/init.d/$srv ]; then
+ if [ -n "$srv" ]; then
+ if [ -f /etc/rc.d/init.d/$srv -o -f /etc/xinet.d/$srv ]; then
/sbin/chkconfig --add $srv
if [ -r /etc/sysconfig/system ]; then
@@ -155,6 +156,7 @@ add_service() {
done
fi
fi
+ fi
fi
}