You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dnl FIXME: For command prefix usage like used in this
299
+
dnl script, we might be better off defining a shell
300
+
dnl function and referring to it. Grep would catch
301
+
dnl also user names that have a group as secondary!
302
+
PROBE_OS_GROUP="cat /etc/groups | grep -w "
303
+
], [
304
+
dnl This shows groups of a USER with specified name!
305
+
dnl But to probe for cases where string names are
306
+
dnl same (e.g. "nut" or "ups") this might be good
307
+
dnl enough.
308
+
PROBE_OS_GROUP="${ID} -g "
309
+
])
310
+
AC_MSG_WARN([Can not PROPERLY check existence of group accounts on this system, but can try best-effort])
298
311
],[
299
312
AC_MSG_WARN([Can not check existence of user and group accounts on this system])
300
313
])
@@ -307,7 +320,7 @@ dnl certain other configure options (e.g. "in-place replacement")
307
320
RUN_AS_USER="nobody"
308
321
RUN_AS_GROUP="nobody"
309
322
AS_IF([test -n "`${PROBE_OS_GROUP} nogroup`" && ! test -n "`${PROBE_OS_GROUP} "${RUN_AS_GROUP}"`"],
310
-
[RUN_AS_GROUP="nogroup"]
323
+
[RUN_AS_GROUP="nogroup"]
311
324
)
312
325
313
326
dnl NOTE: NUT legacy default, keep as is for least surprise
@@ -463,7 +476,11 @@ AS_IF([test x"$nut_enable_inplace_runtime" = xyes -a x"${NUT_VERSION_DEPLOYED-}"
463
476
&& test x"${CONFIG_FLAGS_DEPLOYED}" != x \
464
477
|| CONFIG_FLAGS_DEPLOYED=""
465
478
466
-
NUT_VERSION_DEPLOYED="`"${DEPLOYED_TOOL}" -DV 2>&1 | grep 'configured with flags:' | head -1 | sed 's,^.*Network UPS Tools version \(.*\) configured with flags:.*$,\1,'`" \
479
+
dnl NOTE: Currntly NUT_VERSION_DEPLOYED is just informative (or a flag
480
+
dnl that we've "reentered" the configuration script), so we tolerate a
481
+
dnl better detailed string that is more than just a version, e.g.:
482
+
dnl 2.8.2.1829-1829-g8f8a4f417 (development iteration after 2.8.2) built with gcc (Debian 10.2.1-6) 10.2.1 20210110
483
+
NUT_VERSION_DEPLOYED="`"${DEPLOYED_TOOL}" -DV 2>&1 | grep 'configured with flags:' | head -1 | sed -e 's,^.*Network UPS Tools version \(.*\) configured with flags:.*$,\1,' -e 's, and *$,,'`" \
467
484
&& test x"${NUT_VERSION_DEPLOYED}" != x \
468
485
|| NUT_VERSION_DEPLOYED=""
469
486
@@ -4035,6 +4052,8 @@ dnl This option is only provided so that make distcheck can override it,
4035
4052
dnl otherwise we ask pkg-config whenever --with-systemdsystemunitdir is
0 commit comments