summary refs log tree commit diff
path: root/host/rootfs/etc/init
blob: a4c6c60948920709494d4be0f407c23894559107 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/execlineb -P
# SPDX-License-Identifier: EUPL-1.2
# SPDX-FileCopyrightText: 2020-2022 Alyssa Ross <hi@alyssa.is>

/bin/export PATH /bin
/bin/s6-setsid -qb --

umask 022
if { mount -t tmpfs -o mode=0755 tmpfs /run }
if { s6-dumpenv /run/param }
if { s6-hiercopy /etc/service /run/service }
emptyenv -p

background {
  s6-setsid --

  if { s6-rc-init -c /etc/s6-rc /run/service }

  if { s6-mkdir -p /dev/pts /dev/shm }

  if { mount -a }

  s6-rc change ok-all
}

unexport !
cd /run/service
s6-svscan