diff options
author | jdp <jdp@FreeBSD.org> | 2000-01-14 04:53:10 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2000-01-14 04:53:10 +0000 |
commit | 28b1393e41a0f1158f1d4f3c387ed1400820feff (patch) | |
tree | 89cb8e7b0496821e053488ee40fc3bec336aaca2 /net/cvsup-mirror | |
parent | 4fa62d845cba5310d1707931942bec882d7eaa9f (diff) | |
download | FreeBSD-ports-28b1393e41a0f1158f1d4f3c387ed1400820feff.zip FreeBSD-ports-28b1393e41a0f1158f1d4f3c387ed1400820feff.tar.gz |
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.
Diffstat (limited to 'net/cvsup-mirror')
-rw-r--r-- | net/cvsup-mirror/files/update.sh | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/net/cvsup-mirror/files/update.sh b/net/cvsup-mirror/files/update.sh index 9a51805..905a3d7 100644 --- a/net/cvsup-mirror/files/update.sh +++ b/net/cvsup-mirror/files/update.sh @@ -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 |