aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-27 19:53:23 +0100
committerColin Guthrie <colin@mageia.org>2014-07-27 19:53:23 +0100
commit7a7ee261362d61c730196df299a05347a68f9369 (patch)
tree888a35504f9b28463894b960eea4facdcc5b5c3e
parentb147129f0ba40e800e97a51f841e7fa3eb294090 (diff)
downloadrpm-helper-7a7ee261362d61c730196df299a05347a68f9369.tar
rpm-helper-7a7ee261362d61c730196df299a05347a68f9369.tar.gz
rpm-helper-7a7ee261362d61c730196df299a05347a68f9369.tar.bz2
rpm-helper-7a7ee261362d61c730196df299a05347a68f9369.tar.xz
rpm-helper-7a7ee261362d61c730196df299a05347a68f9369.zip
Drop hacky workaround for systemd reload on sysv initscript package removal
Due to the fact that systemd is reload by chkconfig, it will still think the service exists. A hacky patch was included which rm'ed the sysvinit script and then reloaded systemd again, which worked but caused errors from rpm when removing packages complaining that a file it controlled did not exist (which was correct). It's actually much better to fix this with a filetrigger. We actually already ship a filetrigger that performs appropriate daemon-reloads, but it only matched on native units. Simply changing the regexp to include sysvinit script paths too should fix the problem equally well, but in a much less hacky way.
-rw-r--r--NEWS2
-rwxr-xr-xdel-service8
2 files changed, 2 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index cf85649..5d850a5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+ * drop hacky workaround for systemd reload on sysv initscript package removal
+ as a filetrigger with appropriate matching will suffice fine here
* drop systemd migration scripts we never used
2012-09-30 Colin Guthrie <colin@mageia.org> 0.24.11
diff --git a/del-service b/del-service
index da61231..9f8adf4 100755
--- a/del-service
+++ b/del-service
@@ -95,14 +95,6 @@ if [ $num = 0 ]; then
/bin/systemctl --no-reload --quiet disable $units >/dev/null
[ -n "$srv" -a -f /etc/rc.d/init.d/$srv ] && /sbin/chkconfig --del $srv
-
- # Yes - this is very ugly workaround. chkconfig --del does daemon-reload,
- # but initscript is still there, so it remains loaded. Remove file and
- # reload again. Systemd units are supposed to provide postun script
- if [ -n "$srv" -a -f /etc/rc.d/init.d/$srv -a x$init = xsystemd ]; then
- /bin/rm -f /etc/rc.d/init.d/$srv
- /bin/systemctl daemon-reload
- fi
fi
# del-service ends here