minor follow up

This commit is contained in:
Meliox 2025-09-08 21:46:14 +02:00
parent 1f5b73e6ac
commit d5e25c67f9

View File

@ -406,7 +406,6 @@ collect_sensors_output() {
fi fi
#region sensors heredoc #region sensors heredoc
sed -i '/my \$dinfo = df('\''\/'\'', 1);/i\ sed -i '/my \$dinfo = df('\''\/'\'', 1);/i\
\
# Collect sensor data from lm-sensors\ # Collect sensor data from lm-sensors\
$res->{sensorsOutput} = `'"$sensorsCmd"'`;\ $res->{sensorsOutput} = `'"$sensorsCmd"'`;\
\ \
@ -443,7 +442,6 @@ collect_ups_output() {
# region ups heredoc # region ups heredoc
sed -i "/my \$dinfo = df('\/', 1);/i\\ sed -i "/my \$dinfo = df('\/', 1);/i\\
\\
# Collect UPS status information\\ # Collect UPS status information\\
sub get_upsc {\\ sub get_upsc {\\
my \$cmd = '$ups_cmd';\\ my \$cmd = '$ups_cmd';\\
@ -470,7 +468,10 @@ collect_system_info() {
| paste -sd " " - \ | paste -sd " " - \
| sed 's/ |$//') | sed 's/ |$//')
#region system info heredoc #region system info heredoc
sed -i "/my \$dinfo = df('\/', 1);/i\\\t\t\$res->{systemInfo} = \"$(echo "$systemInfoCmd")\";\n" "$NODES_PM_FILE" sed -i "/my \$dinfo = df('\/', 1);/i\\
# Add system information to response\\
\$res->{systemInfo} = \"$(echo "$systemInfoCmd")\";\\
" "$NODES_PM_FILE"
#endregion system info heredoc #endregion system info heredoc
info "System information retriever added to \"$output_file\"." info "System information retriever added to \"$output_file\"."
} }