Some checks reported errors
Aimee OS/aimee-os/pipeline/head Something is wrong with the build of this commit
Until I develop a captive portal-based mechanism for initially configuring the WiFi on Raspberry Pi machines, the easiest way to do initial provisioning is using the CLI via the serial console. Since the root account has no password, and I don't want to have to specify one in downstream projects' configurations, I've added a configuration option to enable automatically launching a root shell connected to the serial console instead of a login prompt. The security risks here are pretty minimal, because someone would need phyiscal access to the device in order to use this shell, in which case they could use any number of other methods to get control of the system.
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
################################################################################
|
|
#
|
|
# Aimee OS Utils
|
|
#
|
|
################################################################################
|
|
|
|
AIMEE_OS_UTILS_VERSION = 2.0
|
|
AIMEE_OS_UTILS_LICENSE = GPL-3.0+
|
|
AIMEE_OS_UTILS_DEPENDENCIES = \
|
|
host-fakeroot \
|
|
btrfs-progs \
|
|
|
|
AIMEE_OS_UTILS_SOURCE =
|
|
|
|
define AIMEE_OS_UTILS_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D -m u=rwx,go=rx \
|
|
$(AIMEE_OS_UTILS_PKGDIR)/system-update.sh \
|
|
$(TARGET_DIR)/usr/sbin/system-update
|
|
mkdir -p $(TARGET_DIR)/boot/efi
|
|
endef
|
|
|
|
define AIMEE_OS_UTILS_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m u=rw,go=r \
|
|
$(AIMEE_OS_UTILS_PKGDIR)/var.mount \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/var.mount
|
|
$(INSTALL) -D -m u=rw,go=r \
|
|
$(AIMEE_OS_UTILS_PKGDIR)/90-default.network \
|
|
$(TARGET_DIR)/usr/lib/systemd/network/90-default.network
|
|
endef
|
|
|
|
define AIMEE_OS_UTILS_ROOT_SHELL_INSTALL
|
|
|
|
$(INSTALL) -D -m u=rw,go=r \
|
|
$(AIMEE_OS_UTILS_PKGDIR)/root-shell@.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/root-shell@.service
|
|
$(INSTALL) -d -m u=rwx,go=rx \
|
|
$(TARGET_DIR)/usr/lib/systemd/system-preset
|
|
printf 'enable root-shell@.service %s\n' \
|
|
$(AIMEE_OS_ROOT_SHELL_CONSOLE) \
|
|
> $(TARGET_DIR)/usr/lib/systemd/system-preset/50-root-shell.preset
|
|
endef
|
|
|
|
ifeq ($(AIMEE_OS_ROOT_SHELL),y)
|
|
AIMEE_OS_UTILS_INSTALL_INIT_SYSTEMD += $(AIMEE_OS_UTILS_ROOT_SHELL_INSTALL)
|
|
endif
|
|
|
|
$(eval $(generic-package))
|