[arch-dev-public] initscripts change: daemon shutdown
initscripts have been changed to only shut down daemons which use add_daemon and are thus in /var/run/daemons. Please fix daemon scripts which both need a shutdown AND don't have add_daemon. On my end, I will fix bluetooth. Please check your system for others.
2007/10/21, Thomas Bächler <thomas@archlinux.org>:
initscripts have been changed to only shut down daemons which use add_daemon and are thus in /var/run/daemons. Please fix daemon scripts which both need a shutdown AND don't have add_daemon.
On my end, I will fix bluetooth. Please check your system for others.
Cc'ed to tur-users ML so there will be more time to check and fix daemons in AUR too. Clarification for AUR users - this change is in Testing yet, but will go to Core soon. -- Roman Kyrylych (Роман Кирилич)
On Sun, Oct 21, 2007 at 11:30:39AM +0200, Thomas Bächler wrote:
initscripts have been changed to only shut down daemons which use add_daemon and are thus in /var/run/daemons. Please fix daemon scripts which both need a shutdown AND don't have add_daemon.
On my end, I will fix bluetooth. Please check your system for others.
I just noticed a problem with dbmail that highlights a method we used to use... What do you do if a daemon script starts multiple daemons? /etc/rc.d/dbmail can start dbmail-imapd, dbmail-pop3d, dbmail-lmtpd and it runs add_daemon dbmail-imapd, dbmail-pop3d, and dbmail-lmtpd. One option is to just run "add_daemon dbmail" to signal arch that we need to stop the dbmail daemon script. Is this what we want to do or are there other ways to fix it? Jason
On 10/26/07, Jason Chu <jason@archlinux.org> wrote:
On Sun, Oct 21, 2007 at 11:30:39AM +0200, Thomas Bächler wrote:
initscripts have been changed to only shut down daemons which use add_daemon and are thus in /var/run/daemons. Please fix daemon scripts which both need a shutdown AND don't have add_daemon.
On my end, I will fix bluetooth. Please check your system for others.
I just noticed a problem with dbmail that highlights a method we used to use...
What do you do if a daemon script starts multiple daemons? /etc/rc.d/dbmail can start dbmail-imapd, dbmail-pop3d, dbmail-lmtpd and it runs add_daemon dbmail-imapd, dbmail-pop3d, and dbmail-lmtpd.
One option is to just run "add_daemon dbmail" to signal arch that we need to stop the dbmail daemon script. Is this what we want to do or are there other ways to fix it?
I don't think I understand what you mean. Each daemon script should be "reversible" - that is, if my start) section spawns off 3 processes, they should all be killed by stop). If it starts other rc.d scripts, then it should also stop them as well. If stopping them is not a good idea (in the case of hal/dbus), as long as THOSE scripts add_daemon, it will be handled properly.
On Fri, Oct 26, 2007 at 12:12:27PM -0500, Aaron Griffin wrote:
On 10/26/07, Jason Chu <jason@archlinux.org> wrote:
On Sun, Oct 21, 2007 at 11:30:39AM +0200, Thomas Bächler wrote:
initscripts have been changed to only shut down daemons which use add_daemon and are thus in /var/run/daemons. Please fix daemon scripts which both need a shutdown AND don't have add_daemon.
On my end, I will fix bluetooth. Please check your system for others.
I just noticed a problem with dbmail that highlights a method we used to use...
What do you do if a daemon script starts multiple daemons? /etc/rc.d/dbmail can start dbmail-imapd, dbmail-pop3d, dbmail-lmtpd and it runs add_daemon dbmail-imapd, dbmail-pop3d, and dbmail-lmtpd.
One option is to just run "add_daemon dbmail" to signal arch that we need to stop the dbmail daemon script. Is this what we want to do or are there other ways to fix it?
I don't think I understand what you mean. Each daemon script should be "reversible" - that is, if my start) section spawns off 3 processes, they should all be killed by stop). If it starts other rc.d scripts, then it should also stop them as well. If stopping them is not a good idea (in the case of hal/dbus), as long as THOSE scripts add_daemon, it will be handled properly.
Nope, it's not like that. The dbmail rc script works wonderfully. The problem is the way rc.shutdown detects running daemons. When rc.shutdown starts shutting down it goes through all the files in /var/run/daemons instead of checking DAEMONS in rc.conf. It looks at each file in /var/run/daemons and sees if /var/run/daemons/* exists in /etc/rc.d. If it does, then it runs /etc/rc.d/* stop. Because dbmail calls add_daemon dbmail-imapd, etc rc.shutdown looks for /etc/rc.d/dbmail-imapd and never tries to run /etc/rc.d/dbmail. Jason
On 10/26/07, Jason Chu <jason@archlinux.org> wrote:
On Fri, Oct 26, 2007 at 12:12:27PM -0500, Aaron Griffin wrote:
On 10/26/07, Jason Chu <jason@archlinux.org> wrote:
On Sun, Oct 21, 2007 at 11:30:39AM +0200, Thomas Bächler wrote:
initscripts have been changed to only shut down daemons which use add_daemon and are thus in /var/run/daemons. Please fix daemon scripts which both need a shutdown AND don't have add_daemon.
On my end, I will fix bluetooth. Please check your system for others.
I just noticed a problem with dbmail that highlights a method we used to use...
What do you do if a daemon script starts multiple daemons? /etc/rc.d/dbmail can start dbmail-imapd, dbmail-pop3d, dbmail-lmtpd and it runs add_daemon dbmail-imapd, dbmail-pop3d, and dbmail-lmtpd.
One option is to just run "add_daemon dbmail" to signal arch that we need to stop the dbmail daemon script. Is this what we want to do or are there other ways to fix it?
I don't think I understand what you mean. Each daemon script should be "reversible" - that is, if my start) section spawns off 3 processes, they should all be killed by stop). If it starts other rc.d scripts, then it should also stop them as well. If stopping them is not a good idea (in the case of hal/dbus), as long as THOSE scripts add_daemon, it will be handled properly.
Nope, it's not like that. The dbmail rc script works wonderfully. The problem is the way rc.shutdown detects running daemons.
When rc.shutdown starts shutting down it goes through all the files in /var/run/daemons instead of checking DAEMONS in rc.conf. It looks at each file in /var/run/daemons and sees if /var/run/daemons/* exists in /etc/rc.d. If it does, then it runs /etc/rc.d/* stop.
Because dbmail calls add_daemon dbmail-imapd, etc rc.shutdown looks for /etc/rc.d/dbmail-imapd and never tries to run /etc/rc.d/dbmail.
Then it should add_daemon dbmail, shouldn't it? The "dbmail stop" should handle the variations, if you ask me.
participants (4)
-
Aaron Griffin
-
Jason Chu
-
Roman Kyrylych
-
Thomas Bächler