Skip to content

Commit

Permalink
Fix emonpiRelease developing errors for non-emonpi
Browse files Browse the repository at this point in the history
Fix emonpiRelease developing errors for non-emonpi
  • Loading branch information
Paul-Reed authored Jul 22, 2017
1 parent ea7a30e commit a9df690
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/admin/admin_main_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,12 @@ function disk_list()
// Raspberry Pi
if ( @exec('ifconfig | grep b8:27:eb:') ) {
echo "<tr><td><b>Pi</b></td><td>CPU Temp</td><td>".number_format((int)@exec('cat /sys/class/thermal/thermal_zone0/temp')/1000, '2', '.', '')."&degC".chkRebootBtn()."</td></tr>\n";
}
foreach (glob("/boot/emonSD-*") as $emonpiRelease) {
$emonpiRelease = str_replace("/boot/", '', $emonpiRelease);
}
if (isset($emonpiRelease)) {
echo "<tr><td class=\"subinfo\"></td><td>Release</td><td>".$emonpiRelease."</td></tr>\n";
}
echo "<tr><td class=\"subinfo\"></td><td>File-system</td><td>Set root file-system temporarily to read-write, (default read-only)<button id=\"fs-rw\" class=\"btn btn-danger btn-small pull-right\">"._('Read-Write')."</button> <button id=\"fs-ro\" class=\"btn btn-info btn-small pull-right\">"._('Read-Only')."</button></td></tr>\n";
}

Expand Down

1 comment on commit a9df690

@pb66
Copy link
Collaborator

@pb66 pb66 commented on a9df690 Feb 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit causes errors to non-pi sytems by allowing a check for the emonSD version details on the /boot partition. See https://community.openenergymonitor.org/t/error-after-update-to-v9-8-28/6629?u=pb66

Please sign in to comment.