diff --git a/initrd/install.h b/initrd/install.h index 4d4aaf4..019864c 100644 --- a/initrd/install.h +++ b/initrd/install.h @@ -6,8 +6,8 @@ PREREQ # tcsd exits if it doesn't have tss group and user - grep tss /etc/group >> "${TARGET_DIR:-MUST_EXIST}/etc/group" - grep tss /etc/passwd >> "${TARGET_DIR:-MUST_EXIST}/etc/passwd" + grep tss /etc/group >> "${TARGET_DIR:?must exist}/etc/group" + grep tss /etc/passwd >> "${TARGET_DIR:?must exist}/etc/passwd" for f in /lib/udev/rules.d/*tpm*; do INST_UDEV "$f" @@ -15,13 +15,13 @@ if [ -e /etc/tcsd.conf ]; then INST_CFG /etc/tcsd.conf - chown root:tss "${TARGET_DIR:-MUST_EXIST}/etc/tcsd.conf" + chown root:tss "${TARGET_DIR:?must exist}/etc/tcsd.conf" system_ps_file="$(awk -F '[[:space:]]*=[[:space:]]*' '!/^[[:space:]]*#/ && !/^$/ && $1 ~ /system_ps_file$/ {gsub(/[[:space:]]*$/, "", $2); print $2}' /etc/tcsd.conf)" system_ps_file="${system_ps_file:-/var/lib/tpm/system.data}" fi # tcsd can't find SRK if state not present, refuses to start if it doesn't have parent to tss dir - mkdir -p "${TARGET_DIR:-MUST_EXIST}/$(dirname "$(dirname "$system_ps_file")")" + mkdir -p "${TARGET_DIR:?must exist}/$(dirname "$(dirname "$system_ps_file")")" [ -f "$system_ps_file" ] && INST_STATE "$system_ps_file" }