* Stuart Henderson <[EMAIL PROTECTED]> [2008-05-23 14:16]:
> On 2008-05-23, Henning Brauer <[EMAIL PROTECTED]> wrote:
> > * Stuart Henderson <[EMAIL PROTECTED]> [2008-05-23 12:56]:
> >> This reminds me, is there a deliberate reason for forcing the control
> >> socket to be unlinked (at least ospfd and bgpd, probably others) rather
> >> than just refusing to run if it already exists? Admittedly it's not a
> >> mistake many people will be making twice...
> >
> > that would be kind of a DoS.
> > if the daemon terminates unexpectedly for some reason (as in, doesn't
> > get to clean up) the socket will stay there. and, kaboom, cannot start
> > it.
>
> Is that really valid? If the system reboots, /var/run gets cleaned anyway.
> If the daemon is monitored and automatically restarted, I think whatever is
> restarting it could be responsible to clean those files ...
valid enough to prefer the "clean up on startup" over "fail on startup".
I am probably not the only one paranoid enough to have a little bgpd
watcher that restarts it should it exit. last time it kicked in was
probably over 3 years ago, but you really don't want your core routers
without bgpd, do you? :)
#!/bin/sh
# $BSWS: check-bgpd.sh,v 1.1 2007/10/16 14:32:22 brahe Exp $
# Copyright (c) 2007 Henning Brauer
pgrep -x bgpd >/dev/null
if [ $? -eq 1 ]; then
echo "no bgpd running!!!"
. /etc/rc.conf.local
/usr/sbin/bgpd $bgpd_flags
fi
--
Henning Brauer, [EMAIL PROTECTED], [EMAIL PROTECTED]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam