1 |
Hi |
2 |
|
3 |
It's been brought to my attention that dnsmasq and acpid use start-stop-daemon |
4 |
to send custom signals such as HUP. While this works with baselayout-1.11, it |
5 |
does not work with baselayout-1.12 |
6 |
|
7 |
The start-stop-daemon-binary has to have either a --start or --stop option. |
8 |
Now I read this as two simple statements. |
9 |
1) I want to start daemon foo |
10 |
2) I want to stop daemon foo |
11 |
|
12 |
The aforementioned init scripts want option 3 |
13 |
3) I want to stop daemon foo with signal HUP |
14 |
Which is perfectly valid. However, HUP is not a stop signal and they expect it |
15 |
to process the signal and not stop. |
16 |
|
17 |
baelayout-1.12 is a bit more strict about things. If you ask something to |
18 |
--stop it stops regardless. |
19 |
|
20 |
So, the question now must be, do we allow start-stop-daemon to defy calling |
21 |
logic and NOT stop a daemon? How do we know we're not supposed to stop the |
22 |
daemon based on a custom signal? The answer is we can't. So instead of |
23 |
|
24 |
start-stop-daemon --stop -s HUP -p /var/run/dnsmasq.pid |
25 |
|
26 |
we need to write |
27 |
|
28 |
kill -s HUP $(< /var/run/dnsmasq.pid) |
29 |
|
30 |
Thanks |
31 |
|
32 |
-- |
33 |
Roy Marples <uberlord@g.o> |
34 |
Gentoo Linux Developer |
35 |
-- |
36 |
gentoo-dev@g.o mailing list |