-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Candidate manual system upgrade menu action
- Loading branch information
Showing
8 changed files
with
98 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Translations template for PROJECT. | ||
# Copyright (C) 2023 ORGANIZATION | ||
# Copyright (C) 2024 ORGANIZATION | ||
# This file is distributed under the same license as the PROJECT project. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023. | ||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024. | ||
# | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2023-12-20 14:35+0000\n" | ||
"POT-Creation-Date: 2024-04-26 15:25+0100\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -209,15 +209,15 @@ msgstr "" | |
msgid "go to book list" | ||
msgstr "" | ||
|
||
#: ui/library/view.py:73 | ||
#: ui/library/view.py:74 | ||
msgid "LIBRARY menu" | ||
msgstr "" | ||
|
||
#: ui/library/view.py:83 | ||
#: ui/library/view.py:84 | ||
msgid "back to directory list" | ||
msgstr "" | ||
|
||
#: ui/library/view.py:89 | ||
#: ui/library/view.py:90 | ||
msgid "more directories" | ||
msgstr "" | ||
|
||
|
@@ -232,31 +232,39 @@ msgid "" | |
"files in the library." | ||
msgstr "" | ||
|
||
#: ui/system_menu/system_menu.py:52 | ||
#: ui/system_menu/view.py:15 | ||
msgid "run in standalone mode" | ||
msgstr "" | ||
|
||
#: ui/system_menu/view.py:19 | ||
msgid "emulated" | ||
msgstr "" | ||
|
||
#: ui/system_menu/system_menu.py:62 | ||
#: ui/system_menu/view.py:34 | ||
msgid "shutdown" | ||
msgstr "" | ||
|
||
#: ui/system_menu/system_menu.py:63 | ||
#: ui/system_menu/view.py:35 | ||
msgid "backup log to USB stick" | ||
msgstr "" | ||
|
||
#: ui/system_menu/system_menu.py:64 | ||
#: ui/system_menu/view.py:36 | ||
msgid "select language and code" | ||
msgstr "" | ||
|
||
#: ui/system_menu/system_menu.py:68 | ||
#: ui/system_menu/view.py:37 | ||
msgid "install upgrade from " | ||
msgstr "" | ||
|
||
#: ui/system_menu/view.py:40 | ||
msgid "release:" | ||
msgstr "" | ||
|
||
#: ui/system_menu/system_menu.py:69 | ||
#: ui/system_menu/view.py:41 | ||
msgid "serial:" | ||
msgstr "" | ||
|
||
#: ui/system_menu/view.py:23 | ||
#: ui/system_menu/view.py:49 | ||
msgid "system menu" | ||
msgstr "" | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2023-11-08 10:00+0000\n" | ||
"PO-Revision-Date: 2023-11-08 11:18+0000\n" | ||
"POT-Creation-Date: 2024-04-26 15:25+0100\n" | ||
"PO-Revision-Date: 2024-04-26 14:27+0000\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -117,7 +117,7 @@ msgstr "" | |
"⠃⠥⠞⠞⠕⠝ ⠞⠕ ⠞⠓⠑ ⠇⠑⠋⠞ ⠕⠋ ⠦⠧⠊⠑⠺ ⠎⠽⠎⠞⠑⠍ ⠍⠑⠝⠥⠴\n" | ||
"⠕⠝ ⠞⠓⠑ ⠙⠊⠎⠏⠇⠁⠽⠲" | ||
|
||
#: ui/book/view.py:11 | ||
#: ui/book/view.py:10 | ||
msgid "go to page" | ||
msgstr "⠛⠕ ⠞⠕ ⠏⠁⠛⠑" | ||
|
||
|
@@ -291,15 +291,15 @@ msgstr "" | |
msgid "go to book list" | ||
msgstr "⠛⠕⠀⠞⠕⠀⠃⠕⠕⠅⠀⠇⠊⠎⠞" | ||
|
||
#: ui/library/view.py:73 | ||
#: ui/library/view.py:74 | ||
msgid "LIBRARY menu" | ||
msgstr "⠠⠠⠇⠊⠃⠗⠁⠗⠽⠀⠍⠑⠝⠥" | ||
|
||
#: ui/library/view.py:83 | ||
#: ui/library/view.py:84 | ||
msgid "back to directory list" | ||
msgstr "⠃⠁⠉⠅⠀⠞⠕⠀⠙⠊⠗⠑⠉⠞⠕⠗⠽⠀⠇⠊⠎⠞" | ||
|
||
#: ui/library/view.py:89 | ||
#: ui/library/view.py:90 | ||
msgid "more directories" | ||
msgstr "⠍⠕⠗⠑⠀⠙⠊⠗⠑⠉⠞⠕⠗⠊⠑⠎" | ||
|
||
|
@@ -322,29 +322,38 @@ msgstr "" | |
"⠇⠊⠃⠗⠁⠗⠽⠲" | ||
|
||
#: ui/system_menu/system_menu.py:52 | ||
#: ui/system_menu/view.py:15 | ||
msgid "run in standalone mode" | ||
msgstr "⠗⠥⠝⠀⠊⠝⠀⠎⠞⠁⠝⠙⠁⠇⠕⠝⠑⠀⠍⠕⠙⠑" | ||
|
||
#: ui/system_menu/view.py:19 | ||
msgid "emulated" | ||
msgstr "⠑⠍⠥⠇⠁⠞⠑⠙" | ||
|
||
#: ui/system_menu/system_menu.py:62 | ||
#: ui/system_menu/view.py:34 | ||
msgid "shutdown" | ||
msgstr "⠎⠓⠥⠞⠙⠕⠺⠝" | ||
|
||
#: ui/system_menu/system_menu.py:63 | ||
#: ui/system_menu/view.py:35 | ||
msgid "backup log to USB stick" | ||
msgstr "⠃⠁⠉⠅⠥⠏ ⠇⠕⠛ ⠞⠕ ⠠⠠⠥⠎⠃ ⠎⠞⠊⠉⠅" | ||
|
||
#: ui/system_menu/system_menu.py:64 | ||
#: ui/system_menu/view.py:36 | ||
msgid "select language and code" | ||
msgstr "⠎⠑⠇⠑⠉⠞ ⠇⠁⠝⠛⠥⠁⠛⠑ ⠁⠝⠙ ⠉⠕⠙⠑" | ||
|
||
#: ui/system_menu/system_menu.py:68 | ||
#: ui/system_menu/view.py:37 | ||
msgid "install upgrade from " | ||
msgstr "⠊⠝⠎⠞⠁⠇⠇⠀⠥⠏⠛⠗⠁⠙⠑⠀⠋⠗⠕⠍⠀" | ||
|
||
#: ui/system_menu/view.py:40 | ||
msgid "release:" | ||
msgstr "⠗⠑⠇⠑⠁⠎⠑⠒" | ||
|
||
#: ui/system_menu/system_menu.py:69 | ||
#: ui/system_menu/view.py:41 | ||
msgid "serial:" | ||
msgstr "⠎⠑⠗⠊⠁⠇⠒" | ||
|
||
#: ui/system_menu/view.py:23 | ||
#: ui/system_menu/view.py:49 | ||
msgid "system menu" | ||
msgstr "⠎⠽⠎⠞⠑⠍ ⠍⠑⠝⠥" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PROJECT VERSION\n" | ||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" | ||
"POT-Creation-Date: 2023-11-08 10:00+0000\n" | ||
"PO-Revision-Date: 2023-11-08 11:18+0000\n" | ||
"POT-Creation-Date: 2024-04-26 15:25+0100\n" | ||
"PO-Revision-Date: 2024-04-26 14:27+0000\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
|
@@ -110,7 +110,7 @@ msgstr "" | |
"⠏⠗⠑⠎⠎ ⠮ ⠇⠔⠑ ⠎⠑⠇⠑⠉⠞ ⠃⠥⠞⠞⠕⠝ ⠞⠕ ⠮ ⠇⠑⠋⠞ ⠷\n" | ||
"⠦⠧⠊⠑⠺ ⠎⠽⠌⠑⠍ ⠍⠢⠥⠴ ⠕⠝ ⠮ ⠲⠏⠇⠁⠽⠲" | ||
|
||
#: ui/book/view.py:11 | ||
#: ui/book/view.py:10 | ||
msgid "go to page" | ||
msgstr "⠛ ⠞⠕ ⠏⠁⠛⠑" | ||
|
||
|
@@ -268,15 +268,15 @@ msgstr "" | |
msgid "go to book list" | ||
msgstr "⠛⠀⠞⠕⠀⠃⠕⠕⠅⠀⠇⠊⠌" | ||
|
||
#: ui/library/view.py:73 | ||
#: ui/library/view.py:74 | ||
msgid "LIBRARY menu" | ||
msgstr "⠠⠠⠇⠊⠃⠗⠜⠽⠀⠍⠢⠥" | ||
|
||
#: ui/library/view.py:83 | ||
#: ui/library/view.py:84 | ||
msgid "back to directory list" | ||
msgstr "⠃⠁⠉⠅⠀⠞⠕⠀⠙⠊⠗⠑⠉⠞⠕⠗⠽⠀⠇⠊⠌" | ||
|
||
#: ui/library/view.py:89 | ||
#: ui/library/view.py:90 | ||
msgid "more directories" | ||
msgstr "⠍⠀⠙⠊⠗⠑⠉⠞⠕⠗⠊⠑⠎" | ||
|
||
|
@@ -295,30 +295,38 @@ msgstr "" | |
"⠡⠁⠝⠛⠑ ⠮ ⠎⠽⠌⠑⠍ ⠇⠁⠝⠛⠥⠁⠛⠑ ⠕⠗ ⠠⠃⠗⠇ ⠉⠕⠙⠑⠂ ⠝ ⠮\n" | ||
"⠇⠁⠝⠛⠥⠁⠛⠑ ⠕⠗ ⠉⠕⠙⠑ ⠷ ⠁⠝⠽ ⠋⠊⠇⠑⠎ ⠔ ⠮ ⠇⠊⠃⠗⠜⠽⠲" | ||
|
||
#: ui/system_menu/system_menu.py:52 | ||
#: ui/system_menu/view.py:15 | ||
msgid "run in standalone mode" | ||
msgstr "⠗⠥⠝⠀⠔⠀⠌⠯⠁⠇⠐⠕⠀⠍⠕⠙⠑" | ||
|
||
#: ui/system_menu/view.py:19 | ||
msgid "emulated" | ||
msgstr "⠑⠍⠥⠇⠁⠞⠫" | ||
|
||
#: ui/system_menu/system_menu.py:62 | ||
#: ui/system_menu/view.py:34 | ||
msgid "shutdown" | ||
msgstr "⠩⠥⠞⠙⠪⠝" | ||
|
||
#: ui/system_menu/system_menu.py:63 | ||
#: ui/system_menu/view.py:35 | ||
msgid "backup log to USB stick" | ||
msgstr "⠃⠁⠉⠅⠥⠏ ⠇⠕⠛ ⠞⠕ ⠠⠠⠥⠎⠃ ⠌⠊⠉⠅" | ||
|
||
#: ui/system_menu/system_menu.py:64 | ||
#: ui/system_menu/view.py:36 | ||
msgid "select language and code" | ||
msgstr "⠎⠑⠇⠑⠉⠞ ⠇⠁⠝⠛⠥⠁⠛⠑ ⠯ ⠉⠕⠙⠑" | ||
|
||
#: ui/system_menu/system_menu.py:68 | ||
#: ui/system_menu/view.py:37 | ||
msgid "install upgrade from " | ||
msgstr "⠔⠌⠁⠇⠇⠀⠥⠏⠛⠗⠁⠙⠑⠀⠋⠀" | ||
|
||
#: ui/system_menu/view.py:40 | ||
msgid "release:" | ||
msgstr "⠗⠑⠇⠂⠎⠑⠒" | ||
|
||
#: ui/system_menu/system_menu.py:69 | ||
#: ui/system_menu/view.py:41 | ||
msgid "serial:" | ||
msgstr "⠎⠻⠊⠁⠇⠒" | ||
|
||
#: ui/system_menu/view.py:23 | ||
#: ui/system_menu/view.py:49 | ||
msgid "system menu" | ||
msgstr "⠎⠽⠌⠑⠍ ⠍⠢⠥" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
from ..config_loader import load | ||
|
||
def mounted_paths(): | ||
config = load() | ||
media_dir = config.get('files', {}).get('media_dir') | ||
source_dirs = config.get('files', {}).get('library', []) | ||
|
||
for source_dir in source_dirs: | ||
source_path = os.path.join(media_dir, source_dir.get('path')) | ||
if source_dir.get('mountpoint', False) and os.path.ismount(source_path): | ||
yield source_path, source_dir.get('name') | ||
|
||
available = False | ||
source_paths = mounted_paths() | ||
for source_path, source_name in source_paths: | ||
for upgrade in ['sysupgrade', 'sysupgrade.sh']: | ||
upgrade_file = os.path.join(source_path, upgrade) | ||
if os.path.exists(upgrade_file): | ||
available = True | ||
break | ||
|
||
def upgrade(): | ||
go_file = os.path.join(source_path, 'sysupgrade-now.txt') | ||
open(go_file, 'a').close() | ||
os.system('shutdown -r now') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters