aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-10-27 17:58:07 +0000
committerColin Guthrie <colin@mageia.org>2014-10-27 17:58:07 +0000
commit639520d01453dad653ba4095265a49097560ce6a (patch)
treea1c7fa9355f5e3cc86ef0918c511e38a9654aa07
parent48da69a11f9282311a22cf8efbe0257539f67717 (diff)
downloadrpm-helper-639520d01453dad653ba4095265a49097560ce6a.tar
rpm-helper-639520d01453dad653ba4095265a49097560ce6a.tar.gz
rpm-helper-639520d01453dad653ba4095265a49097560ce6a.tar.bz2
rpm-helper-639520d01453dad653ba4095265a49097560ce6a.tar.xz
rpm-helper-639520d01453dad653ba4095265a49097560ce6a.zip
Don't leak failure exit code from del-service when no sysvinit script exists.
-rw-r--r--NEWS1
-rwxr-xr-xdel-service4
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 7f63271..3b8c77e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+ * don't leak failure exit code when no sysvinit script exists
* be quieter when disabling services on uninstall too
2014-10-09 Colin Guthrie <colin@mageia.org> 0.24.14
diff --git a/del-service b/del-service
index 2d28963..388add9 100755
--- a/del-service
+++ b/del-service
@@ -94,7 +94,9 @@ if [ $num = 0 ]; then
fi
/bin/systemctl --no-reload --quiet disable $units >/dev/null 2>&1
- [ -n "$srv" -a -f /etc/rc.d/init.d/$srv ] && /sbin/chkconfig --del $srv
+ if [ -n "$srv" -a -f /etc/rc.d/init.d/$srv ]; then
+ /sbin/chkconfig --del $srv
+ fi
fi
# del-service ends here