patches and low-level development discussion
 help / color / mirror / code / Atom feed
53ab12755cbda45bcf08ff2a213840dd531588c3 blob 1189 bytes (raw)

 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
30
31
32
33
34
35
36
 
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2022 Unikie

if { mkdir -p /run/s6-rc.ext.src }

if {
  elglob -0 dirs /ext/svc/data/*/
  forx -E dir { $dirs }
  backtick -E name { basename -- $dir }

  cd /run/s6-rc.ext.src

  if { mkdir -- ${name} ${name}/dependencies.d ${name}/env }
  if { redirfd -w 1 ${name}/type echo longrun }
  if { redirfd -w 1 ${name}/notification-fd echo 3 }
  if { ln -s -- /bin/start-vm ${name}/run }

  if {
    elglob -0 paths ${dir}/shared-dirs/*
    forx -pE path { $paths }
    backtick -E fsname { basename -- $path }
    if { cp -R -- /etc/template/fs ${name}-fs-${fsname} }
    if { mkdir -- ${name}-fs-${fsname}/data ${name}-fs-${fsname}/env }
    if { cp -P -- ${path}/dir ${name}-fs-${fsname}/data/shared-dir }
    touch -- ${name}/dependencies.d/${name}-fs-${fsname}
  }

  elglob -0 paths /ext/svc/data/${name}/providers/net/*
  forx -pE path { $paths }
  backtick -E dep { basename -- $path }
  touch -- ${name}/dependencies.d/${dep}
}

if { s6-rc-compile /run/s6-rc.ext.db /run/s6-rc.ext.src }
s6-rc-init -c /run/s6-rc.ext.db -l /run/s6-rc.ext -p ext- /run/service
debug log:

solving 53ab127 ...
found 53ab127 in https://spectrum-os.org/git/spectrum

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).