forked from szafranski/RH-ota
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnet_hotspot_menu.py
executable file
·66 lines (48 loc) · 1.86 KB
/
net_hotspot_menu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import os
from modules import rhim_load_config, clear_the_screen, logo_top, Bcolors
from net_hotspot_manual_12 import net_hotspot_manual_12
from net_hotspot_auto_12 import net_hotspot_auto_12
from net_hotspot_manual_11 import net_hotspot_manual_11
from net_hotspot_auto_11 import net_hotspot_auto_11
def show_os_info(config):
clear_the_screen()
logo_top(config.debug_mode)
print("\n\n")
os.system("cat /sys/firmware/devicetree/base/model")
print("\n")
os.system("cat /etc/os-release")
print("\n\n")
input("Hit 'Enter' to exit")
def net_menu(config):
while True:
clear_the_screen()
logo_top(config.debug_mode)
features_menu_content = """
{rmh}NETWORKING MENU (choose right OS){endc}{bold}
1 - Setup automatic hotspot/Wi-Fi (Bookworm)
2 - Setup hotspot - always on (Bookworm)
3 - Setup automatic hotspot/Wi-Fi (Bullseye)
4 - Setup hotspot - always on (Bullseye)
5 - Show my Raspberry Pi OS information
{yellow}e - Exit to main menu {endc}
""".format(rmh=Bcolors.RED_MENU_HEADER, yellow=Bcolors.YELLOW_S, bold=Bcolors.BOLD, endc=Bcolors.ENDC)
print(features_menu_content)
selection = input()
if selection == '1':
net_hotspot_auto_12()
elif selection == '2':
net_hotspot_manual_12()
elif selection == '3':
net_hotspot_auto_11(config)
elif selection == '4':
net_hotspot_manual_11(config)
elif selection == '5':
show_os_info(config)
elif selection == 'e':
break
pass
def main():
config = rhim_load_config()
net_menu(config)
if __name__ == "__main__":
main()