]>
git.saurik.com Git - apple/configd.git/blob - configd.tproj/update-mach-services
3 CONFIGD_LAUNCHD_PLIST
=${INSTALL_DIR}/..
/..
/System
/Library
/LaunchDaemons
/${1}
4 CONFIGD_PLUGINS
=/tmp
/plugins.$$
5 EMBEDDED_PROJECTS
=/tmp
/projects.$$
6 PLUGIN_MACHSERVICES
=/tmp
/plugin.$$
8 HAVE_CONFIGD_PLUGINS
="MISSING"
9 HAVE_IPCONFIGURATION
="MISSING"
11 cp /dev
/null
${CONFIGD_PLUGINS}
12 if [ -d ${INSTALL_DIR}/..
/..
/System
/Library
/SystemConfiguration
]; then
13 (cd ${INSTALL_DIR}/..
/..
/System
/Library
/SystemConfiguration
; ls -1d *.bundle
>> ${CONFIGD_PLUGINS} 2>/dev
/null
)
16 cp /dev
/null
${EMBEDDED_PROJECTS}
17 if [ -n "${RC_EMBEDDEDPROJECT_DIR}" -a -d "${RC_EMBEDDEDPROJECT_DIR}" ]; then
18 ( cd ${RC_EMBEDDEDPROJECT_DIR} \
19 ; ls -1d */System
/Library
/SystemConfiguration
2>/dev
/null \
20 | sed -e 's:/System/Library/SystemConfiguration::' \
21 >> ${EMBEDDED_PROJECTS} )
23 if [ -s ${EMBEDDED_PROJECTS} ]; then
24 for PROJECT
in `cat ${EMBEDDED_PROJECTS}`
26 ( cd ${RC_EMBEDDEDPROJECT_DIR}/${PROJECT}/System
/Library
/SystemConfiguration
; ls -1d *.bundle
>> ${CONFIGD_PLUGINS} 2>/dev
/null
)
31 if [ -d ${SDKROOT}/System
/Library
/SystemConfiguration
]; then
32 ( cd ${SDKROOT}/System
/Library
/SystemConfiguration
; ls -1d *.bundle
>> ${CONFIGD_PLUGINS} 2>/dev
/null
)
35 if [ -n "${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}" -a -d "${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}" ]; then
36 ( cd ${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR} ; ls -1d *.bundle
>> ${CONFIGD_PLUGINS} 2>/dev
/null
)
39 for PLUGIN
in `sort -u ${CONFIGD_PLUGINS}`
43 # if [ -z "${PLUGIN_PLIST}" ]; then
44 PLUGIN_INF
=${INSTALL_DIR}/..
/..
/System
/Library
/SystemConfiguration
/${PLUGIN}/Contents
/Info.plist
45 if [ -f ${PLUGIN_INF} ]; then
46 PLUGIN_PLIST
=${PLUGIN_INF}
50 if [ -z "${PLUGIN_PLIST}" ]; then
51 PLUGIN_INF
=${INSTALL_DIR}/..
/..
/System
/Library
/SystemConfiguration
/${PLUGIN}/Info.plist
52 if [ -f ${PLUGIN_INF} ]; then
53 PLUGIN_PLIST
=${PLUGIN_INF}
57 if [ -z "${PLUGIN_PLIST}" -a -s ${EMBEDDED_PROJECTS} ]; then
58 for PROJECT
in `cat ${EMBEDDED_PROJECTS}`
60 PROJECT_INF
=${RC_EMBEDDEDPROJECT_DIR}/${PROJECT}/System
/Library
/SystemConfiguration
/${PLUGIN}/Contents
/Info.plist
61 if [ -f ${PROJECT_INF} ]; then
62 PLUGIN_PLIST
=${PROJECT_INF}
66 PROJECT_INF
=${RC_EMBEDDEDPROJECT_DIR}/${PROJECT}/System
/Library
/SystemConfiguration
/${PLUGIN}/Info.plist
67 if [ -f ${PROJECT_INF} ]; then
68 PLUGIN_PLIST
=${PROJECT_INF}
74 if [ -z "${PLUGIN_PLIST}" ]; then
75 PLUGIN_INF
=${SDKROOT}/System
/Library
/SystemConfiguration
/${PLUGIN}/Contents
/Info.plist
76 if [ -f ${PLUGIN_INF} ]; then
77 PLUGIN_PLIST
=${PLUGIN_INF}
81 if [ -z "${PLUGIN_PLIST}" ]; then
82 PLUGIN_INF
=${SDKROOT}/System
/Library
/SystemConfiguration
/${PLUGIN}/Info.plist
83 if [ -f ${PLUGIN_INF} ]; then
84 PLUGIN_PLIST
=${PLUGIN_INF}
88 if [ -n "${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}" ]; then
89 if [ -z "${PLUGIN_PLIST}" ]; then
90 PLUGIN_INF
=${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}/${PLUGIN}/Contents
/Info.plist
91 if [ -f ${PLUGIN_INF} ]; then
92 PLUGIN_PLIST
=${PLUGIN_INF}
96 if [ -z "${PLUGIN_PLIST}" ]; then
97 PLUGIN_INF
=${EXTRA_SYSTEMCONFIGURATION_PLUGIN_DIR}/${PLUGIN}/Info.plist
98 if [ -f ${PLUGIN_INF} ]; then
99 PLUGIN_PLIST
=${PLUGIN_INF}
104 if [ -z "${PLUGIN_PLIST}" ]; then
108 /usr
/libexec
/PlistBuddy
-c "Print :MachServices" -x ${PLUGIN_PLIST} > ${PLUGIN_MACHSERVICES} 2>/dev
/null
109 if [ $?
-eq 0 ]; then
110 echo "Merging \"MachServices\" from: ${PLUGIN_INF}"
111 /usr
/libexec
/PlistBuddy
-c "Merge ${PLUGIN_MACHSERVICES} :MachServices" ${CONFIGD_LAUNCHD_PLIST} 2>/dev
/null
112 if [ -n "${IPHONEOS_DEPLOYMENT_TARGET}" ]; then
113 /usr
/bin
/plutil
-convert binary1
${CONFIGD_LAUNCHD_PLIST}
115 /usr
/bin
/plutil
-convert xml1
${CONFIGD_LAUNCHD_PLIST}
121 HAVE_CONFIGD_PLUGINS
="OK"
123 "IPConfiguration.bundle" )
124 HAVE_IPCONFIGURATION
="OK"
129 rm -f ${PLUGIN_MACHSERVICES} ${CONFIGD_PLUGINS} ${EMBEDDED_PROJECTS}
131 if [ "${HAVE_CONFIGD_PLUGINS}" != "OK" ]; then
133 echo "**************************************************************************************"
134 echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (configd_plugins)"
135 echo "**************************************************************************************"
137 elif [ "${HAVE_IPCONFIGURATION}" != "OK" -a "${PLATFORM_NAME}" != "iphonesimulator" ] ; then
139 echo "****************************************************************************"
140 echo "* THE BUILD ENVIRONMENT IS MISSING THE ROOT FOR AN ESSENTIAL PROJECT (bootp)"
141 echo "****************************************************************************"