Skip to content

Commit f51486d

Browse files
committed
Update gateway-config scripts.
1 parent f7c4634 commit f51486d

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

layers/targets/meta-raspberrypi/recipes-core/gateway-config/gateway-config/gateway-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ do_main_menu() {
164164
case "$FUN" in
165165
1) do_setup_admin_password;;
166166
2) do_setup_concentrator_shield;;
167-
3) vi /etc/lora-packet-forwarder/global_conf.json && do_main_menu;;
168-
4) vi /etc/lora-gateway-bridge/lora-gateway-bridge.toml && do_main_menu;;
167+
3) nano /etc/lora-packet-forwarder/global_conf.json && do_main_menu;;
168+
4) nano /etc/lora-gateway-bridge/lora-gateway-bridge.toml && do_main_menu;;
169169
5) do_restart_packet_forwarder;;
170170
6) do_restart_lora_gateway_bridge;;
171171
7) do_configure_wifi;;

layers/targets/meta-raspberrypi/recipes-core/gateway-config/gateway-config_1.0.0.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ HOMEPAGE = "https://www.loraserver.io/"
33
LICENSE = "MIT"
44
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
55

6-
RDEPENDS_${PN} = "dialog resize-rootfs"
6+
RDEPENDS_${PN} = "dialog resize-rootfs nano"
77

88
SRC_URI = "file://gateway-config.sh \
99
"

layers/targets/meta-wifx/recipes-core/gateway-config/gateway-config/gateway-config.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ do_restart_lora_gateway_bridge() {
7272

7373
}
7474

75+
do_resize_root_fs() {
76+
dialog --title "Resize root FS" --msgbox "This will resize the root FS to utilize all available space. The gateway will reboot after which the resize process will start. Please note that depending the SD Card size, this will take some time during which the gateway cann be less responsive.\n\n
77+
To monitor the root FS resize, you can use the following command:\ndf -h" 25 60
78+
79+
clear
80+
echo "The gateway will now reboot!"
81+
/etc/init.d/resize-rootfs start
82+
}
83+
7584
do_main_menu() {
7685
FUN=$(dialog --title "LoRa Gateway OS" --cancel-label "Quit" --menu "Configuration options:" 15 60 7 \
7786
1 "Set admin password" \
@@ -80,6 +89,7 @@ do_main_menu() {
8089
4 "Edit LoRa Gateway Bridge config" \
8190
5 "Restart packet-forwarder" \
8291
6 "Restart LoRa Gateway Bridge" \
92+
7 "Resize root FS" \
8393
3>&1 1>&2 2>&3)
8494
RET=$?
8595
if [ $RET -eq 1 ]; then
@@ -93,6 +103,7 @@ do_main_menu() {
93103
4) nano /etc/lora-gateway-bridge/lora-gateway-bridge.toml && do_main_menu;;
94104
5) do_restart_packet_forwarder;;
95105
6) do_restart_lora_gateway_bridge;;
106+
7) do_resize_root_fs;;
96107
esac
97108
fi
98109
}

layers/targets/meta-wifx/recipes-core/gateway-config/gateway-config_1.0.0.bb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ HOMEPAGE = "https://www.loraserver.io/"
33
LICENSE = "MIT"
44
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
55

6-
RDEPENDS_${PN} = "dialog nano"
6+
RDEPENDS_${PN} = "dialog resize-rootfs nano"
77

88
SRC_URI = "file://gateway-config.sh \
99
"

0 commit comments

Comments
 (0)