diff options
Diffstat (limited to 'packages/system')
-rw-r--r-- | packages/system/openrc/etc/inittab.logging | 5 | ||||
-rw-r--r-- | packages/system/openrc/etc/inittab.reboot | 6 | ||||
-rw-r--r-- | packages/system/openrc/etc/inittab.runlevel | 8 | ||||
-rw-r--r-- | packages/system/openrc/etc/inittab.tty | 3 | ||||
-rw-r--r-- | packages/system/openrc/openrc.mk | 15 |
5 files changed, 37 insertions, 0 deletions
diff --git a/packages/system/openrc/etc/inittab.logging b/packages/system/openrc/etc/inittab.logging new file mode 100644 index 0000000..f74eb07 --- /dev/null +++ b/packages/system/openrc/etc/inittab.logging @@ -0,0 +1,5 @@ +# Logging +null::sysinit:/bin/touch /var/log/messages +null::respawn:/sbin/syslogd -n -m 0 +null::respawn:/sbin/klogd -n + diff --git a/packages/system/openrc/etc/inittab.reboot b/packages/system/openrc/etc/inittab.reboot new file mode 100644 index 0000000..a182944 --- /dev/null +++ b/packages/system/openrc/etc/inittab.reboot @@ -0,0 +1,6 @@ +# Reboot +::ctrlaltdel:/sbin/reboot +null::shutdown:/sbin/openrc shutdown +null::shutdown:/bin/umount -a -r +null::shutdown:/sbin/swapoff -a + diff --git a/packages/system/openrc/etc/inittab.runlevel b/packages/system/openrc/etc/inittab.runlevel new file mode 100644 index 0000000..7c8887e --- /dev/null +++ b/packages/system/openrc/etc/inittab.runlevel @@ -0,0 +1,8 @@ +# Initial system critical filesystems mounting (/proc, /dev, /sys, etc.) +::sysinit:/sbin/openrc sysinit + +# Goto other runlevels now +::wait:/sbin/openrc boot +::wait:/sbin/openrc default +::wait:/sbin/openrc + diff --git a/packages/system/openrc/etc/inittab.tty b/packages/system/openrc/etc/inittab.tty new file mode 100644 index 0000000..b9b2072 --- /dev/null +++ b/packages/system/openrc/etc/inittab.tty @@ -0,0 +1,3 @@ +# Put a getty on the serial port +{ROOTFS_TTY}::respawn:/sbin/getty -L {ROOTFS_TTY} {ROOTFS_TTY_BAUDRATE} vt100 + diff --git a/packages/system/openrc/openrc.mk b/packages/system/openrc/openrc.mk index b087cb9..64d9765 100644 --- a/packages/system/openrc/openrc.mk +++ b/packages/system/openrc/openrc.mk @@ -97,8 +97,23 @@ define __embtk_install_openrc_confd > $(embtk_rootfs)/etc/hostname endef +__embtk_rootfs_tty := $(call embtk_uquote,$(CONFIG_EMBTK_ROOTFS_TTY)) +__embtk_rootfs_tty_baudrate := $(call embtk_uquote,$(CONFIG_EMBTK_ROOTFS_TTY_BAUDRATE)) +define __embtk_install_openrc_inittab + cat $(embtk_openrc_mk)/etc/inittab.runlevel \ + > $(embtk_rootfs)/etc/inittab + cat $(embtk_openrc_mk)/etc/inittab.tty | \ + sed -e 's;{ROOTFS_TTY};$(__embtk_rootfs_tty);g' \ + -e 's;{ROOTFS_TTY_BAUDRATE};$(__embtk_rootfs_tty_baudrate);g' \ + >> $(embtk_rootfs)/etc/inittab + cat $(embtk_openrc_mk)/etc/inittab.logging \ + >> $(embtk_rootfs)/etc/inittab + cat $(embtk_openrc_mk)/etc/inittab.reboot \ + >> $(embtk_rootfs)/etc/inittab +endef define embtk_postinstall_openrc $(__embtk_install_openrc_confd) + $(__embtk_install_openrc_inittab) rm -rf $(embtk_rootfs)/etc/init.d install -d $(embtk_rootfs)/etc/init.d || exit $$? install -m 0644 $(embtk_openrc_mk)/etc/defaultdomain \ |