git: e94b64e1332c - main - sysutils/usermin: Fix interactive prompts during install
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Dec 2025 22:52:52 UTC
The branch main has been updated by olgeni:
URL: https://cgit.FreeBSD.org/ports/commit/?id=e94b64e1332ccb3a4788d79510cc0be8762b4028
commit e94b64e1332ccb3a4788d79510cc0be8762b4028
Author: Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2025-12-29 22:52:13 +0000
Commit: Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2025-12-29 22:52:47 +0000
sysutils/usermin: Fix interactive prompts during install
Replace read statements with auto-answers in setup.sh patch to prevent
the installer from blocking on stdin for config_dir, var_dir, and perl
path inputs.
---
sysutils/usermin/Makefile | 1 +
sysutils/usermin/files/patch-setup.sh | 35 +++++++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/sysutils/usermin/Makefile b/sysutils/usermin/Makefile
index 6c79aec57485..940cc64ce9dd 100644
--- a/sysutils/usermin/Makefile
+++ b/sysutils/usermin/Makefile
@@ -1,5 +1,6 @@
PORTNAME= usermin
PORTVERSION= 2.510
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.webmin.com/uupdates/:up \
SF/webadmin/${PORTNAME}/${PORTVERSION}:sf
diff --git a/sysutils/usermin/files/patch-setup.sh b/sysutils/usermin/files/patch-setup.sh
index af550b380f73..48deb27932d1 100644
--- a/sysutils/usermin/files/patch-setup.sh
+++ b/sysutils/usermin/files/patch-setup.sh
@@ -14,14 +14,16 @@
cd `dirname $0`
if [ -x /bin/pwd ]; then
wadir=`/bin/pwd`
-@@ -93,12 +100,12 @@
+@@ -93,12 +100,13 @@
echo "Unless you want to run multiple versions of Usermin at the same time"
echo "you can just accept the defaults."
echo ""
-printf "Config file directory [/etc/usermin]: "
+printf "Config file directory [%%PREFIX%%/etc/usermin]: "
if [ "$config_dir" = "" ]; then
- read config_dir
+- read config_dir
++ config_dir="%%PREFIX%%/etc/usermin"
++ echo "%%PREFIX%%/etc/usermin"
fi
if [ "$config_dir" = "" ]; then
- config_dir=/etc/usermin
@@ -29,7 +31,7 @@
fi
abspath=`echo $config_dir | grep "^/"`
if [ "$abspath" = "" ]; then
-@@ -202,19 +209,19 @@
+@@ -202,19 +210,20 @@
else
# Config directory exists .. make sure it is not in use
ls $config_dir | grep -v rpmsave >/dev/null 2>&1
@@ -44,7 +46,9 @@
- printf "Log file directory [/var/usermin]: "
+ printf "Log file directory [/var/db/usermin]: "
if [ "$var_dir" = "" ]; then
- read var_dir
+- read var_dir
++ var_dir="/var/db/usermin"
++ echo "/var/db/usermin"
fi
if [ "$var_dir" = "" ]; then
- var_dir=/var/usermin
@@ -52,3 +56,26 @@
fi
abspath=`echo $var_dir | grep "^/"`
if [ "$abspath" = "" ]; then
+@@ -252,7 +261,8 @@
+ if [ "$perl" = "" ]; then
+ if [ "$perldef" = "" ]; then
+ printf "Full path to perl: "
+- read perl
++ perl="%%PERL%%"
++ echo "%%PERL%%"
+ if [ "$perl" = "" ]; then
+ echo "ERROR: No path entered!"
+ echo ""
+@@ -260,10 +270,8 @@
+ fi
+ else
+ printf "Full path to perl (default $perldef): "
+- read perl
+- if [ "$perl" = "" ]; then
+- perl=$perldef
+- fi
++ perl=$perldef
++ echo "$perldef"
+ fi
+ fi
+ echo ""