Re: mars has strange behaviour -- how to package?
mars-nwe is a netware server, which I'm working on packaging.
However, it has some behaviour which is not entirely policy-friendly.
1. It likes to print out a "starting up" type message of its own;
should I just redirect it to /dev/null?
Either do that, or edit the source not to print the message.
2. It provides a way to kill itself, rather than using start-stop-daemon;
which should I use? Unfortunately bugs in the version I tried to
package most recently with libc6 means it wouldn't die at all, but
I've got a newer version to try now.
Use whichever works better. If it kills itself, does it clean up
better than if start-stop-daemon is used?
3. When you kill it, it wants 10 seconds to shutdown. This is quite
reasonable, because it likes to notify all the logged in Netware
users it has before it logs them out. Can I just put in a sleep
to wait until it is gone, or some other check to wait until it has
finished? It also likes to print some messages when it is being
killed -- more trouble, see #1.
Waiting until it is done shutting down seems reasonable. Here is what
I did to my /etc/init.d/dhcpc to make sure it waits for dhcp to come
up when it starts:
echo -n "Starting DHCP client daemon: dhcpcd"
rm -f /tmp/dhcp-up
start-stop-daemon --start --quiet --exec $DAEMON -- -c /etc/dhcpc/up $IFACE
echo -n "Waiting for DHCP to come up... "
while ! test -e /tmp/dhcp-up && test $count != 0; do
count=`expr $count - 1`
if test -e /tmp/dhcp-up; then
where the /etc/dhcpc/up touches a file /tmp/dhcp-up. Now, obviously
you'd want a more secure location than /tmp for a distributed script,
but this works pretty well with the unreliable and slow dhcp we have
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .