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
This commit is contained in:
Clayton Craft 2023-07-19 14:18:05 -07:00 committed by Stefan Hansson
parent 440e57fa50
commit a1ee78900e
No known key found for this signature in database
GPG key ID: 990600ED1DB95E02
2 changed files with 3 additions and 2 deletions

View file

@ -2,7 +2,7 @@
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs
pkgver=2.2
pkgrel=0
pkgrel=1
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
depends="

View file

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