diff options
author | John Polstra <jdp@FreeBSD.org> | 2000-01-14 04:53:10 +0000 |
---|---|---|
committer | John Polstra <jdp@FreeBSD.org> | 2000-01-14 04:53:10 +0000 |
commit | 61c323b40dab3747717c07342d7bf6dfe7db3949 (patch) | |
tree | b73a45b5c778addaffcc0ecd5a8eb7268f07814d /net/cvsup-mirror | |
parent | a7dc76b0aaff4eb133cd4839c4b193d37d12187f (diff) |
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.
Notes
Notes:
svn path=/head/; revision=24713
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 9a51805e118e..905a3d758b2f 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 |