aboutsummaryrefslogtreecommitdiff
path: root/package/sysvinit
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2017-07-18 19:25:32 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-22 22:33:38 +0200
commitb07ccc47cb511b877e6e7bb45c511e0646cb5528 (patch)
treeef75bd79434e25917854e4994567bde9640927aa /package/sysvinit
parent2de968f03a76c3feb5c7693cfc05a6342fcc12ae (diff)
downloadbuildroot-b07ccc47cb511b877e6e7bb45c511e0646cb5528.tar.gz
buildroot-b07ccc47cb511b877e6e7bb45c511e0646cb5528.tar.bz2
system: move setting getty to the corresponding init systems
Currently, setting the getty is done: - by the skeleton package when the init system is either busybox or sysvinit; - by the systemd package when the init system is systemd; both by registering a target-finalize hook. This is not very consistent. Move setting the getty out of the skeleton and into the package that provides the init system, by registering a per-package target-fialize hook. This offloads yet a bit more out of the skeleton, so that it is easier to properly separate the skeletons for the various init systems. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/sysvinit')
-rw-r--r--package/sysvinit/sysvinit.mk8
1 files changed, 8 insertions, 0 deletions
diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk
index ca7d06b61d..e9aa69b27b 100644
--- a/package/sysvinit/sysvinit.mk
+++ b/package/sysvinit/sysvinit.mk
@@ -47,4 +47,12 @@ define SYSVINIT_INSTALL_TARGET_CMDS
ln -sf killall5 $(TARGET_DIR)/sbin/pidof
endef
+ifeq ($(BR2_TARGET_GENERIC_GETTY),y)
+define SYSVINIT_SET_GETTY
+ $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(SYSTEM_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(SYSTEM_GETTY_OPTIONS) $(SYSTEM_GETTY_PORT) $(SYSTEM_GETTY_BAUDRATE) $(SYSTEM_GETTY_TERM) #~' \
+ $(TARGET_DIR)/etc/inittab
+endef
+SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY
+endif # BR2_TARGET_GENERIC_GETTY
+
$(eval $(generic-package))