From: Daniel F. Dickinson Date: Tue, 27 Aug 2019 03:48:49 +0000 (-0400) Subject: nut: Fix bad check for conf exists X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ccdec71b5c457b4c414738f1ef7abf4326272372;p=feed%2Fpackages.git 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 --- 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