Consolidate the cvsup options into one place in the script.
Check the exit status of cvsup, and don't start the server until an update has successfully run to completion.
This commit is contained in:
parent
a7dc76b0aa
commit
61c323b40d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=24713
1 changed files with 13 additions and 10 deletions
|
@ -39,28 +39,31 @@ cd ${base} || exit
|
|||
|
||||
colldir=sup.client
|
||||
startup=${PREFIX}/etc/rc.d
|
||||
options="-1gL 1 -b ${base} -c ${colldir}"
|
||||
|
||||
umask 2
|
||||
|
||||
ok=yes
|
||||
if [ ${host_crypto} = ${host} ]; then
|
||||
echo "Updating from ${host}"
|
||||
cvsup -1gL 1 -b ${base} -c ${colldir} -h ${host} supfile
|
||||
cvsup ${options} -h ${host} supfile || ok=no
|
||||
else
|
||||
if [ -d prefixes/FreeBSD-crypto.cvs ]; then
|
||||
echo "Updating from ${host_crypto}"
|
||||
cvsup -1gL 1 -b ${base} -c ${colldir} -h ${host_crypto} supfile.crypto
|
||||
cvsup ${options} -h ${host_crypto} supfile.crypto || ok=no
|
||||
fi
|
||||
echo "Updating from ${host}"
|
||||
cvsup -1gL 1 -b ${base} -c ${colldir} -h ${host} supfile.non-crypto
|
||||
cvsup ${options} -h ${host} supfile.non-crypto || ok=no
|
||||
fi
|
||||
|
||||
if [ -f .start_server ]; then
|
||||
if [ -x ${startup}/cvsupd.sh ]; then
|
||||
echo -n "Starting the server:"
|
||||
/bin/sh ${startup}/cvsupd.sh
|
||||
echo "."
|
||||
if [ ${ok} = yes ]; then
|
||||
if [ -f .start_server ]; then
|
||||
if [ -x ${startup}/cvsupd.sh ]; then
|
||||
echo -n "Starting the server:"
|
||||
/bin/sh ${startup}/cvsupd.sh
|
||||
echo "."
|
||||
fi
|
||||
rm -f .start_server
|
||||
fi
|
||||
rm -f .start_server
|
||||
fi
|
||||
|
||||
E*O*F
|
||||
|
|
Loading…
Reference in a new issue