From e216e77a77bd1c5e11a6f0f776105fdc064a54fc Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 14 Jul 2017 12:30:49 +0000 Subject: [PATCH] Preserve modified config file through upgrades using @sample Approved by: maintainer Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D11559 --- sysutils/azure-agent/Makefile | 7 +++++++ sysutils/azure-agent/pkg-plist | 1 + 2 files changed, 8 insertions(+) create mode 100644 sysutils/azure-agent/pkg-plist diff --git a/sysutils/azure-agent/Makefile b/sysutils/azure-agent/Makefile index b23c944811b9..7f711455df27 100644 --- a/sysutils/azure-agent/Makefile +++ b/sysutils/azure-agent/Makefile @@ -3,6 +3,7 @@ PORTNAME= azure-agent PORTVERSION= 2.2.13 DISTVERSIONPREFIX= v +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= honzhan@microsoft.com @@ -35,6 +36,7 @@ post-patch: ${WRKSRC}/init/waagent ${WRKSRC}/init/waagent.service \ ${WRKSRC}/setup.py ${REINPLACE_CMD} -e "s,/etc,${PREFIX}/etc,g" \ + -e "/set_conf_files.*freebsd\/waagent.conf/ s/^/#/" \ ${WRKSRC}/setup.py ${REINPLACE_CMD} -e "s,/etc/waagent,${PREFIX}/etc/waagent,g" \ ${WRKSRC}/bin/waagent2.0 \ @@ -47,4 +49,9 @@ post-patch: ${REINPLACE_CMD} -e "s,:/usr/local/bin,:/usr/local/bin:/usr/local/sbin,g" \ ${WRKSRC}/init/freebsd/waagent +post-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/etc + ${INSTALL_DATA} ${WRKSRC}/config/freebsd/waagent.conf \ + ${STAGEDIR}${PREFIX}/etc/waagent.conf.sample + .include diff --git a/sysutils/azure-agent/pkg-plist b/sysutils/azure-agent/pkg-plist new file mode 100644 index 000000000000..6ae81b717ad6 --- /dev/null +++ b/sysutils/azure-agent/pkg-plist @@ -0,0 +1 @@ +@sample etc/waagent.conf.sample