mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 11:37:40 +00:00
Show current user device in system info
This commit is contained in:
@@ -298,7 +298,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
$("#system-info").empty();
|
||||
$("#system-info").append(
|
||||
$('<div class="item">').html(i18next.t('system_type', {'system_type': data.system_type})),
|
||||
$('<div class="item">').html(i18next.t('current_root_partiton', {'root_partition': data.root_partition}))
|
||||
$('<div class="item">').html(i18next.t('current_root_partiton', {'root_partition': data.root_partition})),
|
||||
$('<div class="item">').html(i18next.t('current_user_partiton', {'user_partition': data.user_partition}))
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -491,6 +492,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
title: 'System update',
|
||||
system_info: 'System information',
|
||||
current_root_partiton: 'Current root partition: {{root_partition}}',
|
||||
current_user_partiton: 'Current user partition: {{user_partition}}',
|
||||
system_type: 'System type: {{system_type}}',
|
||||
reboot_system: 'Reboot system',
|
||||
shutdown_system: 'Shutdown system',
|
||||
@@ -552,6 +554,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
title: 'System-Aktualisierung',
|
||||
system_info: 'System-Informationen',
|
||||
current_root_partiton: 'Aktuelle Root-Partition: {{root_partition}}',
|
||||
current_user_partiton: 'Aktuelle User-Partition: {{user_partition}}',
|
||||
system_type: 'System-Typ: {{system_type}}',
|
||||
reboot_system: 'System neu starten',
|
||||
shutdown_system: 'System herunterfahren',
|
||||
|
@@ -55,7 +55,8 @@ proc process {} {
|
||||
} elseif {[lindex $path 1] == "get_system_info"} {
|
||||
set system_type [rmupdate::get_rpi_version]
|
||||
set root_partition [rmupdate::get_partition_device [rmupdate::get_system_device] [rmupdate::get_current_root_partition_number]]
|
||||
return "\{\"system_type\":\"${system_type}\",\"root_partition\":\"${root_partition}\"\}"
|
||||
set user_partition [rmupdate::get_mounted_device "/usr/local"]
|
||||
return "\{\"system_type\":\"${system_type}\",\"root_partition\":\"${root_partition}\",\"user_partition\":\"${user_partition}\"\}"
|
||||
} elseif {[lindex $path 1] == "system_reboot"} {
|
||||
exec /sbin/reboot
|
||||
return "\"reboot initiated\""
|
||||
|
Reference in New Issue
Block a user