nut: Default to run as root but fix alt runas

Since the new hotplug script in master was not backport (new feature),
for 18.06 branch revert the old behavior of running NUT daemons and
drivers as root by default to avoid permisions problems, but backport
fix the support for running as another user for those who can set the
appropriate permissions on the USB (or other) device.

Closes: #7742

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
Daniel F. Dickinson
2018-12-28 16:09:08 -05:00
parent f7048b725d
commit 8f41fa7f82
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ nut_upsmon_conf() {
echo "# Config file automatically generated from UCI config" > "$UPSMON_C"
config_get runas "$cfg" runas "nut"
config_get runas "$cfg" runas
[ -n "$runas" ] && echo "RUN_AS_USER $runas" >> $UPSMON_C
config_get val "$cfg" minsupplies 1