[tor-relays] OpenBSD: tor rc script: don't kill unrelated tor instances (patch)

nusenu nusenu at openmailbox.org
Tue Jun 23 09:52:55 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi Pascal,

what do you think of changing OpenBSD's tor rc script to require
perfect process matches when sending signals to them instead of the
current "kill everything that starts with..." approach?

I've put tor-relays on CC so people can speak up if this change is not
desired or breaks anyone's environment - I believe it fixes them.

Problem:

/etc/rc.d/tor stop
might kill all (including unrelated) tor instances instead of the
intended daemon only.

/etc/rc.d/tor start
might never start the intended daemon if another tor instance is
already running (rc_check believes tor is already running).

/etc/rc.d/tor restart
might kill all tor instances and starts only one.

references:
http://article.gmane.org/gmane.os.openbsd.misc/222896


One line "patch" for /etc/rc.d/tor to address this issue:
(tested with and without custom daemon_flags)

8a9,10
> pexp="${daemon}${daemon_flags:+ ${daemon_flags}}$"
> 

(this line is a complete copy from rc.subr with the addition of one
char: $ )


thanks,
nusenu

https://github.com/nusenu/ansible-relayor/issues/40
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJViSx3AAoJEFv7XvVCELh0y8UQAJgb6JVbKde/xf79YJJr8LW1
t+Rji8A5zZ9VsjcW4Pguf/OZsQEN3MEIkjzTM3kw0q9S8CPnDbF3IYOaZj4ewYkX
8OoNmHfFbcQCC0YCJBlbUJMBtNJqi8pg7qRY4o+qY9KKa9ekUhPer7kzUt4N1A+T
an4z44lh3ytAcehyFxo6hpDGZHHGGsACEIql9Rav6v+DPCBSJnCZsmlT0OeTeV5k
5WEy9nTVzdkX4mKs1xXv8YJFggCrb1uur3q91/5ZGhpKADfRj6T+1i/9622Bcki9
17ADc4ZI73dP3ZelKvpZ+FXhaiZLn6tugdj2dcqnXU8Zras6jKToupFi2nB8xfTV
f70qSdkMP6WOJReCP+KTAGHiCkapyoc9V+8569iZIjUXuD7GbbSpP6I1rOoqSLYH
rao6WpqHVfSMQ5jCaECHBbZY62qBhHH83B/um3nG+WXvvWDPpzjkbEx56RxH3UUo
yZ4naGenbxQzCXsGXhEOAmUkJjSmW+Hw75EyObBLAp00+Q8zAXkHnFOqRGbRuxdl
IKqAYsfGNLr7kPBvz9pxfnOJMfyIBDQ2P2WNyKXvYLME3wKbYMazVxd7cXzmAV5g
QthMuFJ/JhWYI9Lb1U+IQq7LOX+pEWU6u/L2xqjTDj7VMn4UF1WZ6UHhnaLMAotZ
lfiTKPnopA62t+X05ztR
=ysgm
-----END PGP SIGNATURE-----


More information about the tor-relays mailing list