Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc PR/46757: Check for fetch_pkg_vulnerabilities unset first.



details:   https://anonhg.NetBSD.org/src/rev/9846dbdfa689
branches:  trunk
changeset: 780616:9846dbdfa689
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jul 31 09:23:09 2012 +0000

description:
PR/46757: Check for fetch_pkg_vulnerabilities unset first.

diffstat:

 etc/daily |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r 37565c83f216 -r 9846dbdfa689 etc/daily
--- a/etc/daily Tue Jul 31 08:01:30 2012 +0000
+++ b/etc/daily Tue Jul 31 09:23:09 2012 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#      $NetBSD: daily,v 1.84 2012/07/30 22:13:38 jdf Exp $
+#      $NetBSD: daily,v 1.85 2012/07/31 09:23:09 christos Exp $
 #      @(#)daily       8.2 (Berkeley) 1/25/94
 #
 
@@ -246,8 +246,8 @@
        fsck -n -f ${run_fsck_flags} | grep -v '^\*\* Phase'
 fi
 
-echo ""
 if checkyesno run_rdist && [ -f /etc/Distfile ]; then
+       echo ""
        echo "Running rdist:"
        if [ -d /var/log/rdist ]; then
                logf="$(date +%Y.%b.%d)"
@@ -260,13 +260,13 @@
 if pkg_info ${_compat_K_flag} -q -E '*'; then
        echo ""
        echo "Fetching package vulnerabilities database:"
-       if checkyesno fetch_pkg_vulnerabilities; then
-               ( umask 022 && pkg_admin ${_compat_K_flag} \
-                   fetch-pkg-vulnerabilities -u )
-       elif [ -z "$fetch_pkg_vulnerabilities" ]; then
+       if [ -z "fetch_pkg_vulnerabilities" ]; then
                echo "fetch_pkg_vulnerabilities is not set in daily.conf(5)."
                echo "You should set it to YES to enable vulnerability checks"
                echo "or set it to NO to get rid of this warning."
+       elif checkyesno fetch_pkg_vulnerabilities; then
+               ( umask 022 && pkg_admin ${_compat_K_flag} \
+                   fetch-pkg-vulnerabilities -u )
        fi
 fi
 



Home | Main Index | Thread Index | Old Index