package/sysvinit: comment out login line in inittab if getty is disabled
PATCH 1/1 package/sysvinit: comment out login line in inittab if getty is disabled
From: Carlos Santos <[email protected]>
When the "Run a getty" option is disabled, sysvinit doesn't remove the /etc/inittab line from previous builds. With this patch, the line is correctly commented out.
Based on similar change made by Stephen Bos <[email protected]> and Christophe Blaess <[email protected]> for busybox.
--- package/sysvinit/sysvinit.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
package/sysvinit/sysvinit.mk +6 -1
@@ -36,8 +36,13 @@ 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 +else +define SYSVINIT_SET_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 #~' \ + $(TARGET_DIR)/etc/inittab +endef endif # BR2_TARGET_GENERIC_GETTY +SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY SYSVINIT_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
Signature · 1 line
2.18.1
Thomas Petazzoni
AppliedPATCH 1/1 package/sysvinit: comment out login line in inittab if getty is disabled
Quoted 6 lines · On Sun, 27 Oct 2019 10:00:07 -0300 unixmania at gmail.com wrote:
From: Carlos Santos <[email protected]>
When the "Run a getty" option is disabled, sysvinit doesn't remove the
/etc/inittabline from previous builds. With this patch, the line is correctly commented out.
Quoted 7 lines
Based on similar change made by Stephen Bos <[email protected]> and Christophe Blaess <[email protected]> for busybox.
Signed-off-by Carlos Santos <[email protected]>--- package/sysvinit/sysvinit.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com