[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r3763 - branches/OpenDNSSEC-1.1 branches/OpenDNSSEC-1.1/tools trunk/OpenDNSSEC/tools

Rickard Bellgrim rickard.bellgrim at iis.se
Fri Aug 20 08:51:46 CEST 2010


Author: rb
Date: 2010-08-20 08:51:46 +0200 (Fri, 20 Aug 2010)
New Revision: 3763

Modified:
   branches/OpenDNSSEC-1.1/NEWS
   branches/OpenDNSSEC-1.1/tools/ods-control.8.in
   branches/OpenDNSSEC-1.1/tools/ods-control.in
   trunk/OpenDNSSEC/tools/ods-control.8.in
   trunk/OpenDNSSEC/tools/ods-control.in
Log:
Apply patches from ticket #168


Modified: branches/OpenDNSSEC-1.1/NEWS
===================================================================
--- branches/OpenDNSSEC-1.1/NEWS	2010-08-19 10:22:57 UTC (rev 3762)
+++ branches/OpenDNSSEC-1.1/NEWS	2010-08-20 06:51:46 UTC (rev 3763)
@@ -15,10 +15,11 @@
 * Bugreport #166: Correct exit value from signer.
 * Bugreport #167: Zone fetcher now also picks up changes when zonelist is
   reloaded (thanks Rick van Rein)
+* Bugreport #168: ods-control with tightened control for the Enforcer
 * Bugreport #169: Do not include config.h in the distribution
 * Bugreport #170: Typo in a man page (ods-signer)
 * Bugreport #172: Correction of some macros in a man page (ods-timing)
-* bugreport #173: A man page used a macro that does not exist (ods-ksmutil)
+* Bugreport #173: A man page used a macro that does not exist (ods-ksmutil)
 
 
 OpenDNSSEC 1.1.1 - 2010-07-08

Modified: branches/OpenDNSSEC-1.1/tools/ods-control.8.in
===================================================================
--- branches/OpenDNSSEC-1.1/tools/ods-control.8.in	2010-08-19 10:22:57 UTC (rev 3762)
+++ branches/OpenDNSSEC-1.1/tools/ods-control.8.in	2010-08-20 06:51:46 UTC (rev 3763)
@@ -15,6 +15,12 @@
 .B ods\-control start
 .br
 .B ods\-control stop
+.br
+.B ods\-control enforcer start
+.br
+.B ods\-control enforcer stop
+.br
+.B ods\-control enforcer notify
 .SH "DESCRIPTION"
 .LP
 ods\-control is a helper utility which gives a combined interface for different
@@ -37,6 +43,18 @@
 .TP
 \fBstop\fR
 Will stop the two daemons of OpenDNSSEC, ods\-enforcerd and ods\-signerd
+.TP
+\fBenforcer start\fR
+Start the ods\-enforcerd daemon without touching the ods\-signerd and
+return non-zero on problems
+.TP
+\fBenforcer stop\fR
+Stop the ods\-enforcerd daemon without touching the ods\-signerd and
+return non-zero on problems
+.TP
+\fBenforcer notify\fR
+Notify the enforcer that its database has been updated and may need
+further processing by the KASP Enforcer.
 .SH "SEE ALSO"
 .LP
 ods\-auditor(1), ods\-enforcerd(8), ods\-hsmspeed(1),

Modified: branches/OpenDNSSEC-1.1/tools/ods-control.in
===================================================================
--- branches/OpenDNSSEC-1.1/tools/ods-control.in	2010-08-19 10:22:57 UTC (rev 3762)
+++ branches/OpenDNSSEC-1.1/tools/ods-control.in	2010-08-20 06:51:46 UTC (rev 3763)
@@ -37,41 +37,89 @@
 
 'ksm')
 	shift
-	$bindir/ods-ksmutil $@
+	"$bindir/ods-ksmutil" $@
 	;;
 
 'hsm')
 	shift
-	$bindir/ods-hsmutil $@
+	"$bindir/ods-hsmutil" $@
 	;;
 	
 'signer')
 	shift
-	$sbindir/ods-signer $@
+	"$sbindir/ods-signer" $@
 	;;
 
+'enforcer')
+	case "$2" in
+
+	'start')
+		if [ -r "$enforcer_pid_file" ]; then
+			echo "Enforcer is already running"
+			RETVAL=-1
+		else
+			echo "Starting enforcer..."
+			"$sbindir/ods-enforcerd"
+			RETVAL=$?
+			if [ $RETVAL = 0 ]; then
+				while [ ! -r "$enforcer_pid_file" ]; do
+					sleep 1
+				done
+			fi
+		fi
+		exit $RETVAL
+		;;
+
+	'stop')
+		echo "Stopping enforcer..."
+		if [ -r "$enforcer_pid_file" ]; then
+			kill -TERM `cat "$enforcer_pid_file"`
+			RETVAL=$?
+			while [ -r "$enforcer_pid_file" ]; do
+				sleep 1
+			done
+		else
+			echo "Cannot find PID file"
+			RETVAL=1
+		fi
+		exit $RETVAL
+		;;
+
+	'notify')
+		echo "Notifying enforcer of new database..."
+		if [ -r "$enforcer_pid_file" ]; then
+			kill -HUP `cat "$enforcer_pid_file"`
+			RETVAL=$?
+		else
+			echo "Cannot find PID file"
+			RETVAL=1
+		fi
+		exit $RETVAL
+		;;
+
+	*)
+		echo "usage: $progname enforcer start|stop|notify"
+		;;
+
+	esac
+	;;
+
 'start')
 	echo "Starting signer engine..."
-	$sbindir/ods-signer start
+	"$sbindir/ods-signer" start
 
-	echo "Starting enforcer..."
-	$sbindir/ods-enforcerd
+	"$0" enforcer start
 	;;
 
 'stop')
-	echo "Stopping enforcer..."
-	if [ -r $enforcer_pid_file ]; then
-		kill -TERM `cat $enforcer_pid_file`
-	else
-		echo "Cannot find PID file"
-	fi
+	"$0" enforcer stop
 
 	echo "Stopping signer engine.."
-	$sbindir/ods-signer stop
+	"$sbindir/ods-signer" stop
 	;;
 	
 *)
-	echo "usage: $progname ksm|hsm|signer|start|stop ..."
+	echo "usage: $progname ksm|hsm|signer|enforcer|start|stop ..."
 	;;
 
 esac

Modified: trunk/OpenDNSSEC/tools/ods-control.8.in
===================================================================
--- trunk/OpenDNSSEC/tools/ods-control.8.in	2010-08-19 10:22:57 UTC (rev 3762)
+++ trunk/OpenDNSSEC/tools/ods-control.8.in	2010-08-20 06:51:46 UTC (rev 3763)
@@ -15,6 +15,12 @@
 .B ods\-control start
 .br
 .B ods\-control stop
+.br
+.B ods\-control enforcer start
+.br
+.B ods\-control enforcer stop
+.br
+.B ods\-control enforcer notify
 .SH "DESCRIPTION"
 .LP
 ods\-control is a helper utility which gives a combined interface for different
@@ -37,6 +43,18 @@
 .TP
 \fBstop\fR
 Will stop the two daemons of OpenDNSSEC, ods\-enforcerd and ods\-signerd
+.TP
+\fBenforcer start\fR
+Start the ods\-enforcerd daemon without touching the ods\-signerd and
+return non-zero on problems
+.TP
+\fBenforcer stop\fR
+Stop the ods\-enforcerd daemon without touching the ods\-signerd and
+return non-zero on problems
+.TP
+\fBenforcer notify\fR
+Notify the enforcer that its database has been updated and may need
+further processing by the KASP Enforcer.
 .SH "SEE ALSO"
 .LP
 ods\-auditor(1), ods\-enforcerd(8), ods\-hsmspeed(1),

Modified: trunk/OpenDNSSEC/tools/ods-control.in
===================================================================
--- trunk/OpenDNSSEC/tools/ods-control.in	2010-08-19 10:22:57 UTC (rev 3762)
+++ trunk/OpenDNSSEC/tools/ods-control.in	2010-08-20 06:51:46 UTC (rev 3763)
@@ -37,41 +37,89 @@
 
 'ksm')
 	shift
-	$bindir/ods-ksmutil $@
+	"$bindir/ods-ksmutil" $@
 	;;
 
 'hsm')
 	shift
-	$bindir/ods-hsmutil $@
+	"$bindir/ods-hsmutil" $@
 	;;
 
 'signer')
 	shift
-	$sbindir/ods-signer $@
+	"$sbindir/ods-signer" $@
 	;;
 
+'enforcer')
+	case "$2" in
+
+	'start')
+		if [ -r "$enforcer_pid_file" ]; then
+			echo "Enforcer is already running"
+			RETVAL=-1
+		else
+			echo "Starting enforcer..."
+			"$sbindir/ods-enforcerd"
+			RETVAL=$?
+			if [ $RETVAL = 0 ]; then
+				while [ ! -r "$enforcer_pid_file" ]; do
+					sleep 1
+				done
+			fi
+		fi
+		exit $RETVAL
+		;;
+
+	'stop')
+		echo "Stopping enforcer..."
+		if [ -r "$enforcer_pid_file" ]; then
+			kill -TERM `cat "$enforcer_pid_file"`
+			RETVAL=$?
+			while [ -r "$enforcer_pid_file" ]; do
+				sleep 1
+			done
+		else
+			echo "Cannot find PID file"
+			RETVAL=1
+		fi
+		exit $RETVAL
+		;;
+
+	'notify')
+		echo "Notifying enforcer of new database..."
+		if [ -r "$enforcer_pid_file" ]; then
+			kill -HUP `cat "$enforcer_pid_file"`
+			RETVAL=$?
+		else
+			echo "Cannot find PID file"
+			RETVAL=1
+		fi
+		exit $RETVAL
+		;;
+
+	*)
+		echo "usage: $progname enforcer start|stop|notify"
+		;;
+
+	esac
+	;;
+
 'start')
-	echo "Starting enforcer..."
-	$sbindir/ods-enforcerd
+	"$0" enforcer start
 
 	echo "Starting signer engine..."
-	$sbindir/ods-signerd -vvvvv
+	"$sbindir/ods-signerd" -vvvvv
 	;;
 
 'stop')
-	echo "Stopping enforcer..."
-	if [ -r $enforcer_pid_file ]; then
-		kill -TERM `cat $enforcer_pid_file`
-	else
-		echo "Cannot find PID file"
-	fi
+	"$0" enforcer stop
 
 	echo "Stopping signer engine.."
-	$sbindir/ods-signer stop
+	"$sbindir/ods-signer" stop
 	;;
 	
 *)
-	echo "usage: $progname ksm|hsm|signer|start|stop ..."
+	echo "usage: $progname ksm|hsm|signer|enforcer|start|stop ..."
 	;;
 
 esac




More information about the Opendnssec-commits mailing list