git: ee4e8a0b3686 - main - sysutils/amazon-ssm-agent: Fix user creation with pkg -r

Brad Davis brd at FreeBSD.org
Fri Aug 13 01:33:24 UTC 2021


The branch main has been updated by brd (doc, src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee4e8a0b3686f3387ce3eca0f604c076dfe67786

commit ee4e8a0b3686f3387ce3eca0f604c076dfe67786
Author:     Brad Davis <brd at FreeBSD.org>
AuthorDate: 2021-08-13 01:30:31 +0000
Commit:     Brad Davis <brd at FreeBSD.org>
CommitDate: 2021-08-13 01:30:31 +0000

    sysutils/amazon-ssm-agent: Fix user creation with pkg -r
    
    PR:             257800
    Approved by:    cperciva (maintainer)
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sysutils/amazon-ssm-agent/Makefile      | 1 +
 sysutils/amazon-ssm-agent/pkg-deinstall | 2 +-
 sysutils/amazon-ssm-agent/pkg-install   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sysutils/amazon-ssm-agent/Makefile b/sysutils/amazon-ssm-agent/Makefile
index 703a5ba153ad..7409763f549c 100644
--- a/sysutils/amazon-ssm-agent/Makefile
+++ b/sysutils/amazon-ssm-agent/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	amazon-ssm-agent
 PORTVERSION=	2.3.1205.0
+PORTREVISION=	1
 CATEGORIES=	sysutils
 
 MAINTAINER=	cperciva at FreeBSD.org
diff --git a/sysutils/amazon-ssm-agent/pkg-deinstall b/sysutils/amazon-ssm-agent/pkg-deinstall
index 4dded1464e5b..b28dda276a2f 100644
--- a/sysutils/amazon-ssm-agent/pkg-deinstall
+++ b/sysutils/amazon-ssm-agent/pkg-deinstall
@@ -2,5 +2,5 @@
 
 if [ "$2" = "DEINSTALL" ]; then
 	echo "Removing ssm-user"
-	pw userdel ssm-user -r
+	pw -R ${PKG_ROOTDIR} userdel ssm-user -r
 fi
diff --git a/sysutils/amazon-ssm-agent/pkg-install b/sysutils/amazon-ssm-agent/pkg-install
index b71b68827a91..f42d5b710f72 100644
--- a/sysutils/amazon-ssm-agent/pkg-install
+++ b/sysutils/amazon-ssm-agent/pkg-install
@@ -2,5 +2,5 @@
 
 if [ "$2" = "POST-INSTALL" ]; then
 	echo "Creating ssm-user for SSM Agent Sessions"
-	pw useradd ssm-user -G wheel -m
+	pw -R ${PKG_ROOTDIR} useradd ssm-user -G wheel -m
 fi


More information about the dev-commits-ports-main mailing list