MT#8763 check for .git before running the services

On a multi directory config, the services depends on git. Check
first if the git repository exists and warn about it

Change-Id: I52e335c85ecf4a330da44b3088725623f3c04531
changes/90/90/2
Victor Seva 12 years ago
parent 5ed308c1a0
commit 7d422b7878

@ -41,7 +41,16 @@ unifyer() {
}
for dir in ${CONFIG_POOL} ; do
(
if ! [[ "${dir}" =~ ^/ ]] ; then
log_error "${dir} is not an absolute path"
continue
fi
cd "${dir}"
if [ ! -d .git ] ; then
log_info "$dir has no support of .services"
continue
fi
for file in $(git status --porcelain | sed 's/^...//') ; do
if [ -r "$file" ] && [ -r "${SERVICES_POOL_BASE}/${dir}/${file}".services ] ; then
log_debug "unifyer ${SERVICES_POOL_BASE}/${dir}/${file}.services"
@ -51,6 +60,7 @@ for dir in ${CONFIG_POOL} ; do
unifyer "${SERVICES_POOL_BASE}/${dir}"/"$(dirname $file)/ngcpcfg.services"
fi
done
)
done
exec_wrapper() {

Loading…
Cancel
Save