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
|