[Commits] idmgr branch master updated.
Martin Langhoff
martin at laptop.org
Fri Apr 24 12:12:03 EDT 2009
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "/home/olpc-code/git/projects/idmgr".
The branch, master has been updated
via ed0f2e0a5935819eeed68d4ed6d5dc21a4a42ebd (commit)
from 908d2d14ea5b0177053ffe09ea1f312e0739ac77 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
conf.schoolserver/idmgr | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit ed0f2e0a5935819eeed68d4ed6d5dc21a4a42ebd
Author: Martin Langhoff <martin at laptop.org>
Date: Fri Apr 24 18:11:28 2009 +0200
idmgr.init: refuse to run if the domain is not configured yet
This avoid XOs mis-registering...
diff --git a/conf.schoolserver/idmgr b/conf.schoolserver/idmgr
index 70bd466..3446632 100755
--- a/conf.schoolserver/idmgr
+++ b/conf.schoolserver/idmgr
@@ -33,10 +33,24 @@ prog=idmgr
SERVER=/usr/bin/registration-server
RETVAL=0
+check_domain_configured() {
+ if [ ! -e /etc/sysconfig/xs_domain_name ]; then
+ echo "Domain not configured yet" > /dev/stderr
+ exit 1;
+ fi
+
+ domain=`cat "$SYS_DOMAIN_FILE" `
+ if [ "$domain" == "random.xs.laptop.org" ]; then
+ echo "Domain not configured yet" > /dev/stderr
+ exit 1;
+ fi
+}
+
start() {
# Start daemons.
echo -n "Starting $prog: "
+ check_domain_configured
daemon --pidfile=${PID_FILE} $SERVER $OPTS
RETVAL=$?
return $RETVAL
-----------------------------------------------------------------------
--
/home/olpc-code/git/projects/idmgr
More information about the Commits
mailing list