From ccdec71b5c457b4c414738f1ef7abf4326272372 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Mon, 26 Aug 2019 23:48:49 -0400 Subject: [PATCH] nut: Fix bad check for conf exists We were `cat`ing the file instead of just checking for non-empty existance. Fix that. Signed-off-by: Daniel F. Dickinson --- net/nut/files/nut-monitor.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nut/files/nut-monitor.init b/net/nut/files/nut-monitor.init index 1e3ab2930f..72458f21a9 100755 --- a/net/nut/files/nut-monitor.init +++ b/net/nut/files/nut-monitor.init @@ -153,7 +153,7 @@ build_config() { config_foreach nut_upsmon_add master master config_foreach nut_upsmon_add slave slave - [ ! -s "$(cat /var/etc/nut/nut.conf)" ] && { + [ ! -s /var/etc/nut/nut.conf ] && { echo "MODE=netclient" >>/var/etc/nut/nut.conf chmod 640 /var/etc/nut/nut.conf chgrp $(id -gn ${runas:-root}) /var/etc/nut/nut.conf -- 2.30.2