Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Oct 2025 13:47:51 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 60334f077945 - main - sysutils/amazon-ssm-agent: Use pw(8)'s new metalog feature
Message-ID:  <202510091347.599DlpHw004891@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by markj:

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

commit 60334f077945aee154a20ac65076f2bfd69dac9e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-10-09 13:41:50 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-10-09 13:46:47 +0000

    sysutils/amazon-ssm-agent: Use pw(8)'s new metalog feature
    
    This allows the ssm-agent user to be created when installing as an
    unprivileged user.  That is, if the package is installed with pkg(8)'s
    METALOG option set, the home directory for ssm-agent will be added to
    the metalog.
    
    PR:             290080
    Approved by:    cperciva (maintainer)
    Sponsored by:   The FreeBSD Foundation
    Sponsored by:   Klara, Inc.
---
 sysutils/amazon-ssm-agent/pkg-install | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sysutils/amazon-ssm-agent/pkg-install b/sysutils/amazon-ssm-agent/pkg-install
index f42d5b710f72..743ffdd91a85 100644
--- a/sysutils/amazon-ssm-agent/pkg-install
+++ b/sysutils/amazon-ssm-agent/pkg-install
@@ -2,5 +2,9 @@
 
 if [ "$2" = "POST-INSTALL" ]; then
 	echo "Creating ssm-user for SSM Agent Sessions"
-	pw -R ${PKG_ROOTDIR} useradd ssm-user -G wheel -m
+	if [ -n "${PKG_METALOG}" ] && \
+	    pw useradd --help 2>&1 | grep -q -F -- '-M metalog'; then
+		METALOG="-M ${PKG_METALOG}"
+	fi
+	pw ${METALOG} -R ${PKG_ROOTDIR} useradd ssm-user -G wheel -m
 fi


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510091347.599DlpHw004891>