patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob c1d1bbc106b8034c82c8e09c1bff81a06c233fe4 502 bytes (raw)
name: host/rootfs/image/usr/bin/vm-import 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
#!/bin/execlineb -S2
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2023-2024 Alyssa Ross <hi@alyssa.is>

cd $2
elglob -0 names *

forx -po0 -E name { $names }

backtick -E dir { mktemp -d /run/vm/by-id/XXXXXX }
backtick -E id { basename -- $dir }

if { ln -s -- ${dir} /run/vm/by-name/${1}.${name} }
if { ln -s -- ${2}/${name} ${dir}/config }
if { ln -s -- /run/service/vmm/instance/${id} ${dir}/service }

if { create-vm-dependencies $id }

s6-instance-create -- /run/service/vmm $id

debug log:

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

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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

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

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).