#!/bin/sh
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# SPDX-FileCopyrightText: 2022-2026 KUNBUS GmbH

# Check existance of HAT EEPROM according to document:
# https://gitlab.com/revolutionpi/revpi-hat-eeprom/blob/master/docs/RevPi-HAT-EEPROM-Format.md#custom-atoms
has_hat_eeprom() {
	[ -e "$ROOT"/proc/device-tree/hat/custom_1 ]
}

user_pi_exists() {
	getent passwd pi >/dev/null
}
