package/openrc: add support for spawning getty
authorMichał Łyszczek <michal.lyszczek@bofc.pl>
Sun, 4 Aug 2019 12:14:17 +0000 (14:14 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 23 Sep 2019 20:29:28 +0000 (22:29 +0200)
commit4019559de087d9b3a7f54d6b05e388af92b41746
tree81b21969d88be1e14853b5edba6d0c33e7637a76
parentaf8c7b41f515e76b4f00cd333e938d09fd1503d4
package/openrc: add support for spawning getty

We install a template getty service, and we 'instantiate' it in the
default runlevel, using the configured tty.

Ideally, packages that provide a getty program would be responsible
for installing the corresponding service file. However, to keep
consistency with the existing init systems (busybox, systemd, and
sysv), so we do provide it from the openrc package itself.

OpenRC only acts on the files in a runlevel sub-directory, but the
documentation [0] actually suggests that the instance symlink be done
in init.d, and then again symlinked into the actual runlevel
sub-directory. So, we abide by the rules.

Also, to be noted, the getty service file is installed without ensuring
that a getty command is available. This again is not unlike other init
systems, sysvinit and busybox, which behave the same.

[0] https://wiki.gentoo.org/wiki/OpenRC

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
[yann.morin.1998@free.fr:
  - move getty template to openrc package  (Thomas)
  - fix namespace of the vaiables (Thomas)
  - simplify creation of the defaults file
  - rewrite commit log
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/openrc/getty [new file with mode: 0755]
package/openrc/openrc.mk
package/skeleton-init-openrc/skeleton/etc/conf.d/.empty [new file with mode: 0644]
package/skeleton-init-openrc/skeleton/etc/runlevels/default/.empty [new file with mode: 0644]
system/Config.in