[Opendnssec-develop] ods-control hangs

Sion Lloyd sion at nominet.org.uk
Wed Sep 29 11:03:01 UTC 2010


Hi there.

I've had this report from Matthijs:
http://www.pivotaltracker.com/story/show/5184282

Where I think that because ods-control is looking at the return value of the 
parent process (not the forked one) it sees "success" even when, for instance, 
the HSM PIN is wrong in conf.xml...

My shell scripting is a bit rusty, and I don't have much experience in it to 
start with. So can someone sanity-check this before I check it in? I just want 
the start command to timeout. (Sorry about the indenting.)

Cheers,

Sion

sion at sion:~/work/opendnssec/trunk/OpenDNSSEC$ svn diff tools/ods-control.in 
Index: tools/ods-control.in
===================================================================
--- tools/ods-control.in        (revision 4024)
+++ tools/ods-control.in        (working copy)
@@ -62,8 +62,14 @@
                        "$sbindir/ods-enforcerd"
                        RETVAL=$?
                        if [ $RETVAL = 0 ]; then
+                i=0
                                while [ ! -r "$enforcer_pid_file" ]; do
                                        sleep 1
+                    i=$(( $i + 1 ))
+                    if [ $i -ge 10 ]; then
+                        RETVAL=1
+                        break
+                    fi
                                done
                        fi
                fi



More information about the Opendnssec-develop mailing list