main/postmarketos-mkinitfs: fix trigger script (MR 4422)
Adjust the trigger script to only check for the new deviceinfo path. The purpose of this check is to make sure that a full device package is installed, and only in that case run mkinitfs. Otherwise, it will fail because e.g. no kernels may be installed. With recent changes, /etc/deviceinfo is a part of devicepkg-utils and only /usr/share/deviceinfo/deviceinfo really indicates that a device package is installed. Remove the "exit 0" at the end while at it, it did not do anything since the script runs with "/bin/sh -e". Add a comment to make this clear. [ci:skip-build]: already built successfully in CI
This commit is contained in:
parent
ea93a6d07f
commit
d757a36882
2 changed files with 7 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
pkgname=postmarketos-mkinitfs
|
||||
pkgver=2.2.1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Tool to generate initramfs images for postmarketOS"
|
||||
url="https://postmarketos.org"
|
||||
depends="
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/sh -e
|
||||
# This script fails on error (-e). We don't want an error while generating the
|
||||
# initramfs to go unnoticed, it may lead to the device not booting anymore.
|
||||
|
||||
# only invoke mkinitfs if the deviceinfo exists in the rootfs
|
||||
{ [ -f /etc/deviceinfo ] || [ -f /usr/share/deviceinfo/deviceinfo ]; } && /usr/sbin/mkinitfs
|
||||
exit 0
|
||||
# Only invoke mkinitfs if the deviceinfo exists in the rootfs
|
||||
if [ -f /usr/share/deviceinfo/deviceinfo ]; then
|
||||
/usr/sbin/mkinitfs
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue