summaryrefslogtreecommitdiffstats
path: root/src/bin/system-init
blob: 59ca114574f79895f989ded6975681fae9a9d1f7 (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
25
26
27
28
29
#!@shebangdir@/execlineb -P

# ISC license.

redirfd -a 1 /dev/console
redirfd -a 2 /dev/console

multisubstitute {
	importas -SD default BUNDLE
	importas -SD
		/command:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/libexec:/usr/local/libexec
		PATH
}
export PATH ${PATH}

execline-cd /
s6-setsid

if { mount -t tmpfs -o mode=0755 tmpfs @tmpfsdir@ }

prepare-svscan
	@sysconfdir@
	@tmpfsdir@/@sysrundir@
	${BUNDLE}

foreground { mkdir -p -- @tmpfsdir@/@sysrundir@/log }
foreground { cp -Rpf -- @syslogdir@/uncaught-logs @tmpfsdir@/@sysrundir@/log/ }

s6-svscan @tmpfsdir@/@sysrundir@/service