From b289b717a84396801bda6b0949cabbdb8299328d Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Wed, 8 Oct 2014 20:14:40 +0100 Subject: Allow add-service to defer to chkconfig when dealing xinetd services --- add-service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.1