File: isinstallable

package info (click to toggle)
depthcharge-tools-installer 2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 48 kB
  • sloc: sh: 97; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 525 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
set -eu

. /usr/share/debconf/confmodule

log() {
	logger -t "depthcharge-tools-installer" "$@"
}

error () {
	log "$@"
	exit 1
}

# Check if we have a board override.
db_get depthcharge-tools-installer/board
if [ -n "${RET:-}" ]; then
	log "Pretending this is a ChromeOS board '$RET'."
	exit 0
fi

# ChromeOS firmware injects one of these values into the cmdline based
# on which boot mechanism is used.
if ! grep "cros_secure" /proc/cmdline >/dev/null 2>&1; then
	error "Not installing to non-ChromeOS board."
fi