From 54edfd33c521725d06b11d5bbe7ce27b0c1a2cf0 Mon Sep 17 00:00:00 2001 From: desertwitch <24509509+desertwitch@users.noreply.github.com> Date: Tue, 25 Jul 2023 07:40:33 +0200 Subject: [PATCH 01/15] reduce console spam by copy operations --- source/nut/etc/rc.d/rc.nut | 2 +- source/nut/install/doinst.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/nut/etc/rc.d/rc.nut b/source/nut/etc/rc.d/rc.nut index 09f821e3..86356311 100755 --- a/source/nut/etc/rc.d/rc.nut +++ b/source/nut/etc/rc.d/rc.nut @@ -205,7 +205,7 @@ write_config() { mkdir $PLGPATH/ups fi - cp -f /etc/nut/* $PLGPATH/ups + cp -f /etc/nut/* $PLGPATH/ups >/dev/null 2>&1 # update permissions if [ -d /etc/nut ]; then diff --git a/source/nut/install/doinst.sh b/source/nut/install/doinst.sh index d940ea66..8b225204 100644 --- a/source/nut/install/doinst.sh +++ b/source/nut/install/doinst.sh @@ -17,7 +17,7 @@ chmod +0755 $DOCROOT/scripts/* \ /usr/sbin/nut-notify # copy the default -cp -nr $DOCROOT/default.cfg $BOOT/nut.cfg +cp -nr $DOCROOT/default.cfg $BOOT/nut.cfg >/dev/null 2>&1 # remove nut symlink if [ -L /etc/nut ]; then @@ -31,10 +31,10 @@ if [ ! -d $BOOT/ups ]; then fi # copy default conf files to flash drive, if no backups exist there -cp -nr $DOCROOT/nut/* $BOOT/ups +cp -nr $DOCROOT/nut/* $BOOT/ups >/dev/null 2>&1 # copy conf files from flash drive to local system, for our services to use -cp -f $BOOT/ups/* /etc/nut +cp -f $BOOT/ups/* /etc/nut >/dev/null 2>&1 # update permissions if [ -d /etc/nut ]; then From b3f9ae3539dac796d25c0a9cdfaa3f2456d475eb Mon Sep 17 00:00:00 2001 From: desertwitch <24509509+desertwitch@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:55:08 +0200 Subject: [PATCH 02/15] add save diagnostics function add function so user is easily able to save their UPS details into a dummy-ups compliant .dev file, which the plugin developers can then request from the user to better identify problems with certain devices and the plugin itself. --- .../nut/usr/local/emhttp/plugins/nut/NUTdetails.page | 2 ++ .../local/emhttp/plugins/nut/include/nut_status.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/source/nut/usr/local/emhttp/plugins/nut/NUTdetails.page b/source/nut/usr/local/emhttp/plugins/nut/NUTdetails.page index 158f3ac9..53f8ca64 100644 --- a/source/nut/usr/local/emhttp/plugins/nut/NUTdetails.page +++ b/source/nut/usr/local/emhttp/plugins/nut/NUTdetails.page @@ -32,6 +32,8 @@ table.tablesorter tbody tr:nth-child(even) {