Add a root shell on UART console
Until I implement some kind of self-provisioning process for these machines (supposing I ever do), I need a way to log in and configure/troubleshoot. I don't think there's any particular security concern by having an auto-logged-in root shell on the UART console, as accessing it needs physical access to the machine.
parent
d5f94bda25
commit
2c1403b210
|
@ -6,6 +6,7 @@ BR2_GLOBAL_PATCH_DIR="board/raspberrypi/patches"
|
|||
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
|
||||
BR2_TARGET_GENERIC_HOSTNAME="airplaypi"
|
||||
BR2_INIT_SYSTEMD=y
|
||||
BR2_ROOTFS_OVERLAY="$(WORKSPACE)/rootfs-overlay"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_AIMEEOS_PATH)/board/raspberrypi3/post-image.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
[Match]
|
||||
Type=wlan
|
||||
|
||||
[Network]
|
||||
DHCP=true
|
||||
|
||||
[DHCPv4]
|
||||
ClientIdentifier=mac
|
||||
UseDomain=true
|
|
@ -0,0 +1 @@
|
|||
enable root-shell@.service ttyAMA0
|
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=root shell on %I
|
||||
After=sshd.service
|
||||
Conflicts=shutdown.target
|
||||
Conflicts=getty@%i.service serial-getty@%i.service
|
||||
|
||||
[Service]
|
||||
Type=idle
|
||||
Environment=TERM=linux
|
||||
ExecStart=/bin/sh
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
StandardInput=tty
|
||||
TTYPath=/dev/%I
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
KillMode=process
|
||||
IgnoreSIGPIPE=no
|
||||
KillSignal=SIGHUP
|
||||
|
||||
# Unset locale for the console getty since the console has problems
|
||||
# displaying some internationalized messages.
|
||||
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue