[Commits] idmgr branch master updated.
Martin Langhoff
martin at laptop.org
Thu Aug 20 05:58:38 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 a9c941f466fd5949965332bffbc25c8ece5f0ded (commit)
via e74823d5873121592639c812cb72be4d82923ff7 (commit)
via 0f845b6f022a61fc246cfb30d59570df22d84c59 (commit)
from 60cece96912646df1dc446150f8b266338143b14 (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 | 2 +-
idmgr.spec.in | 2 +-
scripts/update_users_1_to_2.py | 7 +++++--
scripts/update_users_2_to_3.py | 6 +++++-
4 files changed, 12 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit a9c941f466fd5949965332bffbc25c8ece5f0ded
Author: Martin Langhoff <martin at laptop.org>
Date: Wed Aug 19 18:56:56 2009 +0200
spec: Fix version number setting at db creation time
diff --git a/idmgr.spec.in b/idmgr.spec.in
index a4098b7..eed265a 100644
--- a/idmgr.spec.in
+++ b/idmgr.spec.in
@@ -48,8 +48,8 @@ getent group xousers > /dev/null 2>&1 || groupadd xousers
# Create the identity database, if there is no pre-existing one
# and set the current rev number
if [ ! -r /home/idmgr/identity.db ] ; then
+ # creates a v2 format file
/home/idmgr/create_registration
- echo 3 > /home/idmgr/storage_format_version
fi
if [ ! -r /home/idmgr/storage_format_version ] || \
commit e74823d5873121592639c812cb72be4d82923ff7
Author: Martin Langhoff <martin at laptop.org>
Date: Wed Aug 19 18:56:25 2009 +0200
upgrades: fix scripts' detection of a running idmgr
diff --git a/scripts/update_users_1_to_2.py b/scripts/update_users_1_to_2.py
index 092613d..384efef 100644
--- a/scripts/update_users_1_to_2.py
+++ b/scripts/update_users_1_to_2.py
@@ -28,8 +28,11 @@ DBFILE='/home/idmgr/identity.db'
#script. The server is still running. Stopping and starting via
#/etc/init.d/idmgr is fine, except it doesn't really match the care
#that 'condrestart' takes with build environments. Oh well. Onwards.
-
-wasrunning = os.path.exists('/var/lock/subsys/idmgr')
+status = subprocess.call(['/etc/init.d/idmgr', 'status'])
+if status == 0:
+ wasrunning = True
+else:
+ wasrunning = False
if wasrunning:
subprocess.check_call(['/etc/init.d/idmgr', 'stop'])
diff --git a/scripts/update_users_2_to_3.py b/scripts/update_users_2_to_3.py
index ad3a77b..b646118 100644
--- a/scripts/update_users_2_to_3.py
+++ b/scripts/update_users_2_to_3.py
@@ -19,7 +19,11 @@ import os.path
DBFILE='/home/idmgr/identity.db'
-wasrunning = os.path.exists('/var/lock/subsys/idmgr')
+status = subprocess.call(['/etc/init.d/idmgr', 'status'])
+if status == 0:
+ wasrunning = True
+else:
+ wasrunning = False
if wasrunning:
subprocess.check_call(['/etc/init.d/idmgr', 'stop'])
commit 0f845b6f022a61fc246cfb30d59570df22d84c59
Author: Martin Langhoff <martin at laptop.org>
Date: Wed Aug 19 18:03:09 2009 +0200
init: fix 'status' to return the appropriate code
the return code from the status() function was being masked.
Use it appropriately, as it conforms to the Fedora (and LSB?)
conventions, as per:
https://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action
diff --git a/conf.schoolserver/idmgr b/conf.schoolserver/idmgr
index 9001b18..e4a212f 100755
--- a/conf.schoolserver/idmgr
+++ b/conf.schoolserver/idmgr
@@ -89,7 +89,7 @@ case "$1" in
;;
status)
status idmgr $PID_FILE
- RETVAL=0
+ RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
-----------------------------------------------------------------------
--
/home/olpc-code/git/projects/idmgr
More information about the Commits
mailing list