From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Tue, 5 Jul 2016 15:41:10 +0200 Subject: [Buildroot] [PATCH 06/24 v2] package/systemd: disabling tty1 getty is a post-install hook In-Reply-To: References: Message-ID: <20160705154110.625d8c60@free-electrons.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello, On Wed, 22 Jun 2016 21:07:28 +0200, Yann E. MORIN wrote: > +define SYSTEMD_DISABLE_SERVICE_TTY1_HOOK > + rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty at tty1.service > +endef > + > SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ > SYSTEMD_INSTALL_INIT_HOOK \ > SYSTEMD_INSTALL_MACHINEID_HOOK \ > - SYSTEMD_INSTALL_RESOLVCONF_HOOK > + SYSTEMD_INSTALL_RESOLVCONF_HOOK \ > + SYSTEMD_DISABLE_SERVICE_TTY1_HOOK > > define SYSTEMD_USERS > systemd-journal -1 systemd-journal -1 * /var/log/journal - - Journal > @@ -228,10 +233,6 @@ define SYSTEMD_USERS > - - input -1 * - - - Input device group > endef > > -define SYSTEMD_DISABLE_SERVICE_TTY1 > - rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty at tty1.service > -endef > - > ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),) > # systemd needs getty.service for VTs and serial-getty.service for serial ttys > # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that > @@ -252,7 +253,6 @@ endef > endif > > define SYSTEMD_INSTALL_INIT_SYSTEMD > - $(SYSTEMD_DISABLE_SERVICE_TTY1) > $(SYSTEMD_INSTALL_SERVICE_TTY) > $(SYSTEMD_INSTALL_SERVICE_NETWORK) > $(SYSTEMD_INSTALL_SERVICE_TIMESYNC) Doing this change doesn't work if BR2_TARGET_GENERIC_GETTY_PORT is "tty1". In this case, you will create getty at tty1.service symlink during _INIT_SYSTEMD, and then you will remove it in your post-install target hook. And you end up with no getty@.service symbolic link. So, I've marked this patch as Rejected in patchwork. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com