diff options
author | Mark Linimon <linimon@FreeBSD.org> | 2010-05-20 03:58:50 +0000 |
---|---|---|
committer | Mark Linimon <linimon@FreeBSD.org> | 2010-05-20 03:58:50 +0000 |
commit | 44bd1479896655c70de3c52d224c2e2697e8a414 (patch) | |
tree | fe08d383e38564a9a3c4eb3ccaffe4a1e2403df1 /Tools | |
parent | eb9cd15988426418f4d032883908dec96e8082a2 (diff) |
Improve error handling a bit.
Notes
Notes:
svn path=/head/; revision=254623
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/buildproxy | 3 | ||||
-rwxr-xr-x | Tools/portbuild/scripts/claim-chroot | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Tools/portbuild/scripts/buildproxy b/Tools/portbuild/scripts/buildproxy index 93c524e541e0..75e085eb5cc3 100755 --- a/Tools/portbuild/scripts/buildproxy +++ b/Tools/portbuild/scripts/buildproxy @@ -75,6 +75,7 @@ while True: sockfile.close() conn.close() - except Exception: + except Exception, e: + print "buildproxy: exception: " + str( e ) pass diff --git a/Tools/portbuild/scripts/claim-chroot b/Tools/portbuild/scripts/claim-chroot index 63c29e9270af..f5a73a57d77f 100755 --- a/Tools/portbuild/scripts/claim-chroot +++ b/Tools/portbuild/scripts/claim-chroot @@ -127,6 +127,10 @@ while [ ${found} != 1 ]; do mkdir ${chroot}/used elif [ "${use_md_swap}" = "1" ]; then unit=$(mdconfig -a -t swap -s ${md_size}) + if [ -z "${unit}" ]; then + echo "error mdconfig" + exit 1 + fi newfs /dev/${unit} > /dev/null chrootnum=$(echo ${unit} | sed 's,md,,') chroot=${chrootdir}/${chrootnum} |