Date: Wed, 19 Jun 2013 09:38:35 -0700 (PDT) From: fred@SUNBOT.Homedns.ORG To: FreeBSD-gnats-submit@freebsd.org Subject: ports/179723: Periodic PKG scripts don't work Message-ID: <201306191638.r5JGcZtE000121@sunbot.homedns.org> Resent-Message-ID: <201306191640.r5JGe0q8055261@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179723 >Category: ports >Synopsis: Periodic PKG scripts don't work >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jun 19 16:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Fred Gilham >Release: FreeBSD 9.1-PRERELEASE amd64 >Organization: Home >Environment: System: FreeBSD sunbot.homedns.org 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Wed Oct 24 15:47:09 PDT 2012 root@sunbot.homedns.org:/usr/local/obj/usr/src/sys/MYKERN amd64 >Description: The scripts installed by the pkg port seem to be incorrect. They have the following: if ${pkgcmd} -N >/dev/null 2>&1 ; then echo 'pkg-backup is enabled but pkg is not used' rc=2 else .... However, this means that if the script finds ${pkgcmd} it will simply exit with an error message. >How-To-Repeat: If you have the pkg port installed, run a script installed by the pkg port, such as /usr/local/etc/periodic/daily/400.status-pkg It will exit with the error message. pkg is installed: root@sunbot:/usr/local/etc/periodic/daily # /usr/local/sbin/pkg -N pkg: 761 packages installed The script exits with an error: root@sunbot:/usr/local/etc/periodic/daily # ./400.status-pkg Checking for out of date packages: status-pkg is enabled but pkg is not used >Fix: Not sure. As a workaround I've been simply changing the line if ${pkgcmd} -N >/dev/null 2>&1 ; then to if 0 -eq ${pkgcmd} -N > /dev/null 2>&1 ; then but I think that defeats the purpose of this part of the script. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306191638.r5JGcZtE000121>