pkg: better fix, /usr/sbin/pkg is used always :/

This commit is contained in:
Franco Fichtner 2021-01-24 11:31:23 +01:00
parent c455ebbe6e
commit 58f0a7ec08

View File

@ -1,4 +1,4 @@
# Copyright (c) 2016-2020 Franco Fichtner <franco@opnsense.org>
# Copyright (c) 2016-2021 Franco Fichtner <franco@opnsense.org>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -26,7 +26,10 @@
LOCALBASE?= /usr/local
PAGER?= less
PKG!= which pkg || echo true
PKG= ${LOCALBASE}/sbin/pkg
.if ! exists(${PKG})
PKG= true
.endif
GIT!= which git || echo true
GITVERSION= ${.CURDIR}/Scripts/version.sh
@ -67,7 +70,7 @@ _CORE_PYTHON!= ${PYTHONLINK} -V
CORE_PYTHON?= ${_CORE_PYTHON:[2]:S/./ /g:[1..2]:tW:S/ //}
.endif
.if exists(${PKG}) && ${PKG} != "/usr/sbin/pkg"
.if exists(${PKG})
_CORE_SYSLOGNG!= ${PKG} query %v syslog-ng
CORE_SYSLOGNG?= ${_CORE_SYSLOGNG:S/./ /g:[1..2]:tW:S/ /./g}
.endif