2020-08-26 13:17:31 +00:00
|
|
|
diff --git a/net-snmp-create-v3-user.in b/net-snmp-create-v3-user.in
|
|
|
|
index 452c269..afd6fa4 100644
|
|
|
|
--- a/net-snmp-create-v3-user.in
|
|
|
|
+++ b/net-snmp-create-v3-user.in
|
|
|
|
@@ -16,6 +16,10 @@ Xalgorithm="DES"
|
|
|
|
token=rwuser
|
|
|
|
|
|
|
|
while test "x$done" = "x" -a "x$1" != "x" -a "x$usage" != "xyes"; do
|
|
|
|
+case "$1" in
|
|
|
|
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
|
|
|
+ *) optarg= ;;
|
|
|
|
+esac
|
|
|
|
|
|
|
|
unset shifted
|
|
|
|
case $1 in
|
2021-05-26 10:22:04 +00:00
|
|
|
@@ -136,7 +140,7 @@ fi
|
|
|
|
echo "$line" >> "$outfile"
|
2020-08-26 13:17:31 +00:00
|
|
|
# Avoid that configure complains that this script ignores @datarootdir@
|
|
|
|
echo "@datarootdir@" >/dev/null
|
|
|
|
-outfile="@datadir@/snmp/snmpd.conf"
|
|
|
|
+outfile="/etc/snmp/snmpd.conf"
|
|
|
|
line="$token $user"
|
|
|
|
echo "adding the following line to $outfile:"
|
2021-05-26 10:22:04 +00:00
|
|
|
echo " $line"
|