diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-08-23 12:46:14 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2019-08-23 12:46:14 +0000 |
commit | 7d135651b2c5678073a2acacd769f9fdfb9b6e19 (patch) | |
tree | 81949d08d34c21241434654b18b10b4c7ca8fd5a /Keywords | |
parent | net-mgmt/nagvis: update 1.9.13 to 1.9.14 (diff) |
Use keywords to simplify ldconfig code
PR: 239226
Reviewed by: mat@
Differential Revision: https://reviews.freebsd.org/D20951
Notes
Notes:
svn path=/head/; revision=509644
Diffstat (limited to 'Keywords')
-rw-r--r-- | Keywords/ldconfig-linux.ucl | 15 | ||||
-rw-r--r-- | Keywords/ldconfig.ucl | 19 |
2 files changed, 34 insertions, 0 deletions
diff --git a/Keywords/ldconfig-linux.ucl b/Keywords/ldconfig-linux.ucl new file mode 100644 index 000000000000..7c2397a717f0 --- /dev/null +++ b/Keywords/ldconfig-linux.ucl @@ -0,0 +1,15 @@ +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org +# + +post-install: <<EOD + if [ -n "$(/sbin/sysctl -q compat.linux.osrelease)" ]; then + %@/sbin/ldconfig + fi +EOD +post-deinstall: <<EOD + if [ -n "$(/sbin/sysctl -q compat.linux.osrelease)" ]; then + %@/sbin/ldconfig + fi +EOD diff --git a/Keywords/ldconfig.ucl b/Keywords/ldconfig.ucl new file mode 100644 index 000000000000..e0d8ef3b08fe --- /dev/null +++ b/Keywords/ldconfig.ucl @@ -0,0 +1,19 @@ +# $FreeBSD$ +# +# MAINTAINER: portmgr@FreeBSD.org +# + +post-install: <<EOD + if ! /usr/sbin/service ldconfig restart >/dev/null; then + if [ -z "${INSTALL_AS_USER}" ]; then + exit 1 + fi + fi +EOD +post-deinstall: <<EOD + if ! /usr/sbin/service ldconfig restart >/dev/null; then + if [ -z "${INSTALL_AS_USER}" ]; then + exit 1 + fi + fi +EOD |