diff options
author | kris <kris@FreeBSD.org> | 2003-02-22 22:21:00 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2003-02-22 22:21:00 +0000 |
commit | d4d78754558e20ff95e019938d742d62a96a95a7 (patch) | |
tree | bf8b94f78668fdacd369c825e6df8d0c678e0298 /Tools | |
parent | d8a3d8d00c65247624fd47115141722284b110fc (diff) | |
download | FreeBSD-ports-d4d78754558e20ff95e019938d742d62a96a95a7.zip FreeBSD-ports-d4d78754558e20ff95e019938d742d62a96a95a7.tar.gz |
Simplify the collection of load statistics for the cluster. Loads
are now collected by polling a small server on the client (using netcat)
instead of having the client scp the load files to the master every 10
seconds (!!!)
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/buildscript | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/Tools/portbuild/scripts/buildscript b/Tools/portbuild/scripts/buildscript index cb00960..82d28ed 100755 --- a/Tools/portbuild/scripts/buildscript +++ b/Tools/portbuild/scripts/buildscript @@ -27,11 +27,13 @@ if [ $phase = 1 ]; then echo "error in dependency $i, exiting" echo "1" > /tmp/status exit 1 - fi + fi fi done fi + mtree -xcn -k uid,gid,mode -p / > /tmp/mtree + cd $dir || exit 1 pkgname=$(make package-name) echo "================================================================" @@ -67,7 +69,6 @@ else cat /tmp/make.log2 echo "0" > /tmp/status prefix=$(make -V PREFIX) - mtreefile=$(make -V MTREE_FILE) echo "================================================================" echo "checking installed files" find ${prefix} \( \( -perm -4000 -o -perm -2000 -a \! -type d \) -o \( -perm -0002 -o -perm -0020 \) \) -a \! -type l -ls | sort > /tmp/list1 @@ -79,6 +80,9 @@ else echo "found set[ug]id or world-writable files and directories" diff -b /tmp/list2 /tmp/list1 | grep '^>' fi + + mtree -x -f /tmp/mtree -p / | egrep -v '^(var/tmp|tmp/|var/db/pkg/)' > /tmp/list3 + cd /var/db/pkg if [ $(echo $(echo * | wc -c)) != 2 ]; then echo "================================================================" @@ -86,39 +90,37 @@ else prevlist="" count=1 while [ $(echo $(echo * | wc -c)) != 2 -a $(echo $(echo * | wc -c)) != $(echo $(echo $prevlist | wc -c)) ]; do - echo "== phase $count ==" - prevlist="$(echo *)" - for i in *; do - echo "pkg_delete $i" - pkg_delete $i - done + echo "== phase $count ==" + prevlist="$(echo *)" + for i in *; do + echo "pkg_delete $i" + pkg_delete $i + done count=$(($count + 1)) done - if [ $(echo $(echo * | wc -c)) != 2 ]; then - echo "leftover packages:" * -# for i in *; do -# echo "pkg_delete -f $i" -# pkg_delete -f $i -# done - fi +# if [ $(echo $(echo * | wc -c)) != 2 ]; then +# echo "leftover packages:" * +# for i in *; do +# echo "pkg_delete -f $i" +# pkg_delete -f $i +# done +# fi fi - cd /var/db/pkg - if [ "x${mtreefile}" != "x" ]; then - mtree -f ${mtreefile} -p ${prefix} > /tmp/list3 - if [ -s /tmp/list3 ]; then - if [ "x${PLISTCHECK}" != "x" ]; then - echo "1" > /tmp/status - fi - echo "================================================================" - echo "list of extra files and directories in ${prefix}" - cat /tmp/list3 - echo "list of all files and directories in ${prefix}" - cd ${prefix} - find . -exec echo -n 'path: ' \; -exec ls -1d \{} \; | sort - echo "ls -alR ${prefix}" - ls -alR ${prefix} + + if [ -s /tmp/list3 ]; then + echo "================================================================" + echo "list of extra files and directories in /" + cat /tmp/list3 +# echo "list of all files and directories in ${prefix}" +# cd ${prefix} +# find . -exec echo -n 'path: ' \; -exec ls -1d \{} \; | sort +# echo "ls -alR ${prefix}" +# ls -alR ${prefix} + if [ "x${PLISTCHECK}" != "x" ]; then + echo "1" > /tmp/status fi fi + else cat /tmp/make.log2 echo "1" > /tmp/status @@ -129,9 +131,9 @@ else fi if [ -e ${dir}/.keep ]; then - cd ${dir} - objdir=$(make -V WRKDIR) - tar cvfjC /tmp/work.tbz ${objdir}/.. work + cd ${dir} + objdir=$(make -V WRKDIR) + tar cvfjC /tmp/work.tbz ${objdir}/.. work fi echo "================================================================" |