wait for tcp port, socket or file

Steffen Barszus steffenbpunkt at googlemail.com
Thu May 6 08:01:21 BST 2010


Hi !

I planned to write this mail for a few days, so if there are
similarities to systemd its not on purpose. This is just for feedback. 

In general its working fine and giving possibility of nice boot times
and nice and small scripts for boot. 

I guess the 2 issues which bug me most you are allready aware of ...

1.) For simplicity and nice deterministic upstart jobs i have a few
times to often write something like this, to check if after the process
started it also has the service started. For services providing
multiple services its even worse. So to know the socket/port to wait for
and start at it would be really usefull.

post-start script
    # wait for listen on port 80
    while ! nc -q0 localhost 80 </dev/null >/dev/null 2>&1; do
        sleep 1;
    done
end script

if instead i could write 

start on httpd TCP_PORT=80 this would cleanup a lot 

2.) At the moment its sort of edge-triggered, it would be helpfull if
it would be level, at least most of the times. If you have multiple 
dependency its sometimes really hard to get it right at the moment.

If i rely on X and some other process and one of the process goes away,
i still need to know if both of it is fullfilled before starting it.

Hope to see these things solved before any nice to have functionality
like cron/anacron stuff. Another thing i recently not checked, is make
the output reliable log to syslog/rsyslog/whatever. 

Thanks

Steffen











More information about the upstart-devel mailing list