[Exherbo-dev] systemd paludis uninstall phase

Bernd Steinhauser exherbo at bernd-steinhauser.de
Mon Jan 17 17:54:39 GMT 2011


On 17/01/11 18:32, Wulf C. Krueger wrote:
>>          # On uninstall (not upgrade), disable and stop the units
>>          /bin/systemctl disable foobar.service foobar.socket>/dev/null 2>&1
>> || : /bin/systemctl stop foobar.service foobar.socket>/dev/null 2>&1 || :
> While disabling a service would be possible, the user can do that himself
> easily enough if he so desires. Same for stopping said service.
> And again: What if you're not even using systemd as your init system when you
> uninstall a package?
Actually, there is some sort of glitch when using systemd and uninstalling packages.

If you have a service running and then uninstall it, the .service file gets 
removed, because it's not under copy protection (installed in /lib).
The service is still running, but it is not possible to stop it – using 
systemctl – anymore.

Now you can say, that the user is a fool that he uninstalls a package without 
disabling the corresponding service, but it's very easy to forget to 
disable/stop a service before uninstalling the package.

I wouldn't say that services should be automatically stopped and disabled when 
uninstalling the corresponding package, but we should at least throw a warning 
if it is running and/or enabled.



More information about the Exherbo-dev mailing list