pmaports/main/postmarketos-mkinitfs/postmarketos-mkinitfs.trigger
Clayton Craft a1ee78900e
main/postmarketos-mkinitfs: only run if deviceinfo exists (MR 4263)
In some situations, like when building a device package with pmb,
deviceinfo may not exist in the rootfs. mkinitfs 2.2's behavior changed
slightly to fail if it can't find a deviceinfo, and this avoids calling
it in those cases.

[ci:skip-build]: Already built successfully in CI
2023-07-20 17:20:11 +02:00

5 lines
176 B
Bash

#!/bin/sh -e
# only invoke mkinitfs if the deviceinfo exists in the rootfs
{ [ -f /etc/deviceinfo ] || [ -f /usr/share/deviceinfo/deviceinfo ]; } && /usr/sbin/mkinitfs
exit 0