periodic/security: fix warnings on a system with no packages installed
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 7 Dec 2010 01:46:06 +0000 (10:46 +0900)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 7 Dec 2010 08:18:33 +0000 (17:18 +0900)
etc/periodic/security/670.pkgsrcaudit

index c56b01a..45f944d 100644 (file)
@@ -64,9 +64,11 @@ if pkg_info -K ${pkgdb_dir} -q -E '*'; then
                ;;
        *) rc2=0
        esac
-fi
-if [ $rc0 -gt 0 ] || [ $rc1 -gt 0 ] || [ $rc2 -gt 0 ]; then
-       rc=1
+       if [ $rc0 -gt 0 ] || [ $rc1 -gt 0 ] || [ $rc2 -gt 0 ]; then
+               rc=1
+       else
+               rc=0
+       fi
 else
        rc=0
 fi