You are not logged in.

#1 2010-08-31 16:35:54

atordo
Member
Registered: 2007-04-21
Posts: 147

[SOLVED] "/etc/rc.d/(whatever) stop" not executed at shutdown

I've got the following line in my /etc/rc.conf:

DAEMONS=(@syslog-ng iptables wireless-regdom network @hal @pdnsd @crond @sshd @webfsd @polipo)

All daemons are started at boot as expected, problem is that after a recent system update, not all of them are properly stopped at shutdown. I noticed this because polipo's cache (a caching web proxy) kept growing and growing (I purge the cache at the rc.d script when the stop argument is used).

Note that manually typing "/etc/rc.d/(whatever) stop" will properly execute the script. I've tried removing the at-sign (means execute in the background)and changing the order of the daemons to no avail: the scripts are just not ran at shutdown. This happens both with graphical login (runlevel 5) or console (runlevel 3).

Any idea where I should look to resolve this?

Edit: marked as solved.

Last edited by atordo (2010-08-31 18:03:01)

Offline

#2 2010-08-31 17:17:08

olvar
Member
Registered: 2009-11-13
Posts: 97

Re: [SOLVED] "/etc/rc.d/(whatever) stop" not executed at shutdown

If none of the daemons are stopped properly, the only thing I can think of, is that you are shutting down like "poweroff -f" or something like that. In that case, stop doing that! tongue
If that's not the case maybe you can check if the files /var/run/daemons/(whatever) exists before calling shutdown. If they are not there then something is wrong with your init not your shutting down.
Finally, is it possible polipo had crashes before you turned your PC off? maybe that's why your cache is not getting erased.

Offline

#3 2010-08-31 18:01:57

atordo
Member
Registered: 2007-04-21
Posts: 147

Re: [SOLVED] "/etc/rc.d/(whatever) stop" not executed at shutdown

Thanks for the /var/run/daemons tip. It turns out that polipo init script was missing the line "add_daemon polipo" in its start section. Added that and now it shuts down properly. I'll drop a note on the AUR page (previous versions were OK).

Offline

Board footer

Powered by FluxBB