summaryrefslogtreecommitdiff
path: root/layout/rootfs/etc/s6-linux-init/init
blob: 358c2f5f5812f1dacfd5664632c073cc4ccf668f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/command/execlineb -P

/command/export PATH /command:/bin
/command/cd /
s6-setsid -qb --
umask 022
if { s6-echo -- "\n  init created by s6-linux-init-maker\n  see http://skarnet.org/software/s6-linux-init/\n\n" }
if { s6-mount -nwt tmpfs -o mode=0755 tmpfs /run }
if { s6-hiercopy /etc/s6-linux-init/run-image /run }

s6-envdir -I -- /etc/s6-linux-init/env
redirfd -r 0 /dev/null
redirfd -wnb 1 /run/service/s6-svscan-log/fifo
background
{
  s6-setsid --
  redirfd -w 1 /run/service/s6-svscan-log/fifo
  fdmove -c 2 1
  /etc/rc.init
}
unexport !
cd /run/service
fdmove -c 2 1
s6-svscan -st0