add notice about remaining updates on exit
authorMarius Mauch <genone@gentoo.org>
Wed, 19 Jul 2006 10:26:20 +0000 (10:26 -0000)
committerMarius Mauch <genone@gentoo.org>
Wed, 19 Jul 2006 10:26:20 +0000 (10:26 -0000)
svn path=/main/trunk/; revision=3931

bin/etc-update

index a1f81342e56998ea37e4c694f869d9b5e7620e8d..3cedc660b559c9c8ba6ef960895eb718328423e2 100755 (executable)
@@ -376,6 +376,12 @@ function die() {
        trap "" TERM
        trap "" KILL
        echo "Exiting: ${1}"
+       
+       if [ ${2} -eq 0 ]; then
+               scan > /dev/null
+               [ ${count} -gt 0 ] && echo "NOTE: ${count} updates remaining"
+       fi
+       
        rm -rf ${TMP}
        exit ${2}
 }
@@ -387,7 +393,7 @@ scriptname=$(basename $0)
 
 trap die term
 
-[ -w /etc ] || die "Need root priviledges for write access to /etc"
+[ -w /etc ] || die "Need root priviledges for write access to /etc" 1
 
 export PORTAGE_TMPDIR=$(/usr/lib/portage/bin/portageq envvar PORTAGE_TMPDIR)