diff --git a/plugin/nut-2.8.0.plg b/plugin/nut-2.8.0.plg index 0b2e64c5..c2601d3d 100644 --- a/plugin/nut-2.8.0.plg +++ b/plugin/nut-2.8.0.plg @@ -3,7 +3,7 @@ - + @@ -17,7 +17,8 @@ ##&name; -###2023.07.26 +###2023.08.26 + - Update packages to 2.8.0 ###2023.07.26 - fix: reduce console spam of copy operations by redirecting output to /dev/null, as requested in 2023.07.21 #3 (comment) - fix: stop services before a plugin upgrade on the live system to remove any file locks preventing files from getting patched on the running instance. a reboot should now no longer be required for all changes> @@ -189,12 +190,17 @@ dependency files - -&pkgURL;/nut-2.8.0-x86_64-1.txz -2c7a37ac49a3c752536b7f4f43777cc2 + +&pkgURL;/nut-2.8.0-x86_64-2.ssl3.txz +f49b17d960920c6970ad3787a55811f6 + + + +&pkgURL;/nut-2.8.0-x86_64-2.ssl11.txz +50c1fde33e3bb0fe398697bf1e212f75 - + &pkgURL;/nut-2.7.4.20200318-x86_64-1.txz 52de2867d6b8f6bc1a98a45870b05420 @@ -248,6 +254,7 @@ fi if [ "$SERVICE" == "enable" ]; then /etc/rc.d/rc.nut start fi +rm -f /tmp/start_&name; @@ -297,21 +304,20 @@ else ln -sf /var/run/upsmon.pid /var/run/nut/upsmon.pid fi + # Stop service + #echo "stopping services..." + #/etc/rc.d/rc.nut stop 2>/dev/null + + # Upgrade Nut package to latest 2.8 + upgradepkg --install-new &plgPATH;/nut-2.8.0-x86_64-2.txz + # upgrade plugin package upgradepkg --install-new &plgPATH;/&plgNAME;.txz - # Stop service - echo "stopping services..." - /etc/rc.d/rc.nut stop 2>/dev/null - # start network ups tools echo "checking network ups tools configuration..." at -M -f /tmp/start_&name; now 2>/dev/null - sleep 1 - - rm -f /tmp/start_&name; - # Cleaning old plugin source files find &plgPATH;/ -type f -iname "&name;-plugin*.txz" ! -iname "*&version;*" -delete find &plgPATH;/ -type f -iname "&name;-plugin*.md5" ! -iname "*&version;*" -delete @@ -321,7 +327,8 @@ else echo " &name; has been installed." echo " Copyright 2015, macester" echo " Copyright 2020, gfjardim" - echo " Copyright 2015-2022, &author;" + echo " Copyright 2015-2022, Dmacias" + echo " Copyright 2022-2023, &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo "" @@ -366,7 +373,8 @@ echo "-----------------------------------------------------------" echo " &name; has been removed." echo " Copyright 2015, macester" echo " Copyright 2020, gfjardim" -echo " Copyright 2017-2022, &author;" +echo " Copyright 2015-2022, Dmacias" +echo " Copyright 2022-2023, &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo "" diff --git a/plugin/nut.plg b/plugin/nut.plg index 574c0071..61682101 100755 --- a/plugin/nut.plg +++ b/plugin/nut.plg @@ -3,7 +3,7 @@ - + @@ -17,9 +17,11 @@ ##&name; +###2023.08.26 + - Update packages to 2.8.0 ###2023.07.26 - fix: reduce console spam of copy operations by redirecting output to /dev/null, as requested in 2023.07.21 #3 (comment) -- fix: stop services before a plugin upgrade on the live system to remove any file locks preventing files from getting patched on the running instance. a reboot should now no longer be required for all changes to become active. +- fix: stop services before a plugin upgrade on the live system to remove any file locks preventing files from getting patched on the running instance. a reboot should now no longer be required for all changes> - fix: old installation remnants cause updating or transitioning to another nut package on running instance to fail - fix: fix a permissions issue causing some drivers in 2.8.0 not to have access to their required folders - new: add button for users to be able to save their UPS details into a dummy-ups compliant diagnostics file @@ -34,20 +36,20 @@ - simplification of realpower/apparent power if value set manually - used   to separate number and unit (W/VA) - remove obsolete lowbatt fail-safe - Thanks to forum member Peuuuur Noel and Rysz for the PRs. + Thanks to forum member Peuuuur Noel and Rysz for the PRs. ###2023.07.23a - fix: updated code for better calculation and display (in settings/footer/dashboard) between apparent power, real/true power and data available from NUT - add: display power factor in settings page - add: use ups.realpower if available - Thanks to forum member Peuuuur Noel for the PR. + Thanks to forum member Peuuuur Noel for the PR. ###2023.07.22 - fix: persist config files when rebooting - add: implement lowbatt event fail-safe in settings - add: always pull-in latest config files on reinstall/upgrade - add: implement battery replacement notification in settings - Thanks to forum member Rysz for the PR. + Thanks to forum member Rysz for the PR. ###2023.06.03 - Add Small footer style thanks ich777 for the PR. ###2023.02.14 @@ -188,7 +190,17 @@ dependency files - + +&pkgURL;/nut-2.8.0-x86_64-2.ssl3.txz +f49b17d960920c6970ad3787a55811f6 + + + +&pkgURL;/nut-2.8.0-x86_64-2.ssl11.txz +50c1fde33e3bb0fe398697bf1e212f75 + + + &pkgURL;/nut-2.7.4.20200318-x86_64-1.txz 52de2867d6b8f6bc1a98a45870b05420 @@ -203,6 +215,11 @@ The 'nut-package' file. 24702ef930855db3432ed9ee73e93d42 + +&pkgURL;/net-snmp-5.9.3-x86_64-1.txz +5beebc819894c94bedbc531d47cfe497 + + &pkgURL;/net-snmp-5.7.3-x86_64-4.txz b9ef68216b97cb5f0bcd9f3312e5941e @@ -235,6 +252,7 @@ fi if [ "$SERVICE" == "enable" ]; then /etc/rc.d/rc.nut start fi +rm -f /tmp/start_&name; @@ -265,21 +283,39 @@ else /etc/rc.d/rc.nut stop 2>/dev/null fi - # upgrade plugin package - upgradepkg --install-new &plgPATH;/&plgNAME;.txz + # nut-2.7.4 and nut plugin expects: + # Config: /etc/nut + # Pid : /var/run/nut/upsmon.pid + + # nut-2.8.0 expects + # Config: /etc/ups + # Pid : /var/run/upsmon.pid + + if [ ! -d /etc/nut ]; then + # Link nut-2.8.0 config to nut-2.7.4 config + mkdir /etc/nut + cp -f /etc/ups/* /etc/nut + rm -rf /etc/ups + ln -sf /etc/nut /etc/ups + # Link nut-2.7.4 pid to nut-2.8.0 pid + mkdir /var/run/nut + ln -sf /var/run/upsmon.pid /var/run/nut/upsmon.pid + fi # Stop service - echo "stopping services..." - /etc/rc.d/rc.nut stop 2>/dev/null + #echo "stopping services..." + #/etc/rc.d/rc.nut stop 2>/dev/null + + # Upgrade Nut package to latest 2.8 + upgradepkg --install-new &plgPATH;/nut-2.8.0-x86_64-2.txz + + # upgrade plugin package + upgradepkg --install-new &plgPATH;/&plgNAME;.txz # start network ups tools echo "checking network ups tools configuration..." at -M -f /tmp/start_&name; now 2>/dev/null - sleep 1 - - rm -f /tmp/start_&name; - # Cleaning old plugin source files find &plgPATH;/ -type f -iname "&name;-plugin*.txz" ! -iname "*&version;*" -delete find &plgPATH;/ -type f -iname "&name;-plugin*.md5" ! -iname "*&version;*" -delete @@ -289,7 +325,8 @@ else echo " &name; has been installed." echo " Copyright 2015, macester" echo " Copyright 2020, gfjardim" - echo " Copyright 2015-2022, &author;" + echo " Copyright 2015-2022, Dmacias" + echo " Copyright 2022-2023, &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo "" @@ -318,6 +355,11 @@ rm -rf &plgPATH;/ups rm -f &plgPATH;/*.txz \ &plgPATH;/*.md5 +# Remove links for nut-2.8.0 vs nut-2.7.4 +rm -rf /etc/nut +rm -f /etc/ups +rm -rf /var/run/nut + # clean up folders after the removed installation # in case of re-installation of package on live system rm -rf /etc/nut @@ -329,7 +371,8 @@ echo "-----------------------------------------------------------" echo " &name; has been removed." echo " Copyright 2015, macester" echo " Copyright 2020, gfjardim" -echo " Copyright 2017-2022, &author;" +echo " Copyright 2015-2022, Dmacias" +echo " Copyright 2022-2023, &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo ""