patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob e4a873c0fb9eaf96e52680b2c9df6b47beb66710 462 bytes (raw)
name: host/rootfs/image/usr/bin/mount-userdata 	 # 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
20
21
22
23
24
 
#!/bin/execlineb -W
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2025 Alyssa Ross <hi@alyssa.is>

backtick -D "" uuid {
  importas -Siu 1
  blkid -o value -s UUID $1
}

multisubstitute {
  importas -Siu 0
  importas -Siu 1
  importas -Siu uuid
}

case $uuid {
  "" {
    fdmove -c 1 2
    printf "%s: '%s' does not have a UUID\n" $0 $1
  }
}

if { mount -m -o nosuid,nodev,noexec,nosymfollow -- $1 /media/${uuid} }
printf "%s\n" /media/${uuid}

debug log:

solving e4a873c0 ...
found e4a873c0 in https://inbox.spectrum-os.org/spectrum-devel/20251212214859.389183-1-hi@alyssa.is/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251212214859.389183-1-hi@alyssa.is/
diff --git a/host/rootfs/image/usr/bin/mount-userdata b/host/rootfs/image/usr/bin/mount-userdata
new file mode 100755
index 00000000..e4a873c0

Checking patch host/rootfs/image/usr/bin/mount-userdata...
Applied patch host/rootfs/image/usr/bin/mount-userdata cleanly.

index at:
100755 e4a873c0fb9eaf96e52680b2c9df6b47beb66710	host/rootfs/image/usr/bin/mount-userdata

(*) 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/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).