Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
build: add MAINTENANCEMENU option
Browse files Browse the repository at this point in the history
The new maintenance menu needs to be tested in real builds but should
not yet be enabled in production builds.

By adding this feature, but disabled by default, it can be go into
a more extensive security review.

This commit:
* adds the option BASE_MAINTENANCEMENU, default: 'false'
* `startup-maintenance.service` is only enabled if set to true
  • Loading branch information
Stadicus committed Dec 17, 2019
1 parent f129290 commit 27fcab9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions armbian/base/build.conf
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@
# Make root filesystem read-only and overlay it with a temporary filesystem.
# All changes are lost on reboot, guaranteeing a safe state.
#BASE_OVERLAYROOT="true"

# Start Maintenance Menu if authorized maintenance token
# is found on USB flasdrive on boot
#BASE_MAINTENANCEMENU="false"
7 changes: 6 additions & 1 deletion armbian/base/customize-armbian-rockpro64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ CONFIGURATION:
AUTOSETUP SSD: ${BASE_AUTOSETUP_SSD}
BITCOIN SERVICES ENABLED:
${BASE_ENABLE_BITCOIN_SERVICES}
MAINTENANCE MENU: ${BASE_MAINTENANCEMENU}
================================================================================
BUILD OPTIONS:
Expand Down Expand Up @@ -179,6 +180,7 @@ BASE_DASHBOARD_HDMI_ENABLED="false"
BASE_HDMI_BUILD="false"
BASE_MINIMAL="true"
BASE_OVERLAYROOT="true"
BASE_MAINTENANCEMENU="false" # TODO(Stadicus): set "true" by default after further review

# Overwrite defaults if BASE_PRODUCTION_IMAGE set to "false"
if [[ ${BASE_PRODUCTION_IMAGE} == "false" ]]; then
Expand Down Expand Up @@ -471,7 +473,10 @@ systemctl enable update-checks.service

## maintenance menu
importFile /etc/systemd/system/startup-maintenance.service
systemctl enable startup-maintenance.service

if [[ "${BASE_MAINTENANCEMENU}" == "true" ]]; then
systemctl enable startup-maintenance.service
fi

## disable ssh login messages
echo "MOTD_DISABLE='header tips updates armbian-config'" >> /etc/default/armbian-motd
Expand Down
2 changes: 1 addition & 1 deletion armbian/base/scripts/bbb-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ possible commands:
flashdrive <check|mount|umount>
backup <sysconfig|hsm_secret>
restore <sysconfig|hsm_secret>
reset <auth|config|image|ssd>
reset <auth|config>
mender-update <install|commit>
presync <create|restore>
Expand Down

0 comments on commit 27fcab9

Please sign in to comment.