aboutsummaryrefslogtreecommitdiffstats
path: root/add-service
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-10-08 20:14:40 +0100
committerColin Guthrie <colin@mageia.org>2014-10-08 20:14:40 +0100
commitb289b717a84396801bda6b0949cabbdb8299328d (patch)
treea44debe19c00eec4bb32f01729c5709d51268a4b /add-service
parent6cf50098cc6682a34b6cb9d1cc8729a78b291b34 (diff)
downloadrpm-helper-b289b717a84396801bda6b0949cabbdb8299328d.tar
rpm-helper-b289b717a84396801bda6b0949cabbdb8299328d.tar.gz
rpm-helper-b289b717a84396801bda6b0949cabbdb8299328d.tar.bz2
rpm-helper-b289b717a84396801bda6b0949cabbdb8299328d.tar.xz
rpm-helper-b289b717a84396801bda6b0949cabbdb8299328d.zip
Allow add-service to defer to chkconfig when dealing xinetd services
Diffstat (limited to 'add-service')
-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
}