[CalendarServer-changes] [6400] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 5 11:26:16 PDT 2010
Revision: 6400
http://trac.macosforge.org/projects/calendarserver/changeset/6400
Author: wsanchez at apple.com
Date: 2010-10-05 11:26:14 -0700 (Tue, 05 Oct 2010)
Log Message:
-----------
Drop conf_read_key() and it's dependancy on xpath; use calendarserver_config instead.
Modified Paths:
--------------
CalendarServer/trunk/run
CalendarServer/trunk/support/build.sh
Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run 2010-10-05 18:18:10 UTC (rev 6399)
+++ CalendarServer/trunk/run 2010-10-05 18:26:14 UTC (rev 6400)
@@ -149,15 +149,15 @@
# If we've been asked to read a configuration key, just read it and exit.
if [ -n "${read_key}" ]; then
- conf_read_key "${read_key}";
+ "${caldav}/bin/calendarserver_config" "${read_key}";
exit $?;
fi;
if "${kill}" || "${restart}"; then
# mimic logic of 'fullServerPath' from twistedcaldav/config.py to find the pid file
- pidfile="$(conf_read_key "PIDFile")";
- serverroot="$(conf_read_key "ServerRoot")";
- runroot="$(conf_read_key "RunRoot")";
+ pidfile="$("${caldav}/bin/calendarserver_config" "PIDFile")";
+ serverroot="$("${caldav}/bin/calendarserver_config" "ServerRoot")";
+ runroot="$("${caldav}/bin/calendarserver_config" "RunRoot")";
# examine first character of $pidfile
if ( [ "${pidfile:0:1}" == "/" ] || [ "${pidfile:0:1}" == "." ]; ) then
pidfile=$pidfile;
Modified: CalendarServer/trunk/support/build.sh
===================================================================
--- CalendarServer/trunk/support/build.sh 2010-10-05 18:18:10 UTC (rev 6399)
+++ CalendarServer/trunk/support/build.sh 2010-10-05 18:26:14 UTC (rev 6400)
@@ -29,20 +29,6 @@
fi;
}
-# Read a configuration key from the configuration plist file and print it to
-# stdout.
-conf_read_key ()
-{
- local key="$1"; shift;
-
- local xpath="xpath";
-
- # FIXME: This only works for simple values (no arrays, dicts)
- tr '\n' ' ' < "${config}" \
- | ${xpath} "/plist/dict/*[preceding-sibling::key[1]='${key}'" 2> /dev/null \
- | sed -n 's|^<[^<][^<]*>\([^<]*\)</[^<][^<]*>.*$|\1|p';
-}
-
# Initialize all the global state required to use this library.
init_build () {
verbose="";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101005/ee73c488/attachment-0001.html>
More information about the calendarserver-changes
mailing list