main/postmarketos-mkinitfs: improve keyboard-font check (MR 1782)

Fix failure in the osk-sdl "keyboard-font" check when there is a second
key starting with "keyboard-font" (as in osk-sdl MR 105):

	==> initramfs: creating /boot/initramfs-postmarketos-allwinner-extra
	ERROR: Font specified in /etc/osk.conf does not exist!
	ERROR: postmarketos-mkinitfs-0.17-r0.trigger: script exited with error 1
This commit is contained in:
Oliver Smith 2020-12-04 00:30:38 +01:00 committed by clayton craft
parent aa84e67981
commit 2f4a2ea087
No known key found for this signature in database
GPG key ID: 23A30DA6D406B355
2 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=postmarketos-mkinitfs
pkgver=0.17
pkgver=0.18
pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org"
@ -57,5 +57,5 @@ sha512sums="5037cb7285bb7c0c40ca9e6df332d882ef9a8b379756c785f921e062dab1b7e7f313
bafd06286594102b8b3b126c3ae0a77a97f004ab804f03426154310c5107a1acaf3636bdba92626333adfe4fb0df32ff42c6d8d9e7adf35f6da620c6e14407a1 init.sh.in
e4b5bb7206a4a8f99a23414d6830ccf6ecaf2990ca4923842e99fa14dc50a0a4ae88e0368129b423f9e7e7b446f25b641ad629b7aa08682f269aed7a234762cb init_functions.sh
dfc01ee0547ea88b7aa45a005e842b636e9e19bbf1705f3dad53a66d57af7c5c513c092b5469a06d9b00322e56a4d25f1b47e4c5324aafa99f5291679968d1f1 mkinitfs.sh
874b1bba86085a4b7707b3d1ac6534e2027b5783111b2f9c66c2595ada95113a95272c1be9d234b7957c785978de0c5352b4abd70819871caed9efcfbf703dac mkinitfs_functions.sh
42b0e9be17569ca0122f1653c994ed6bee626d94efba3485ccb3587fa1e1594657ec52bd20669a400e7ef492480e414235e76276d8bbd086475e91797d918b03 mkinitfs_functions.sh
c7a3c33daeb12b33ac72207191941c4d634f15c22958273b52af381a70ebaba1d3a9299483f0c447d9e66c560151fe7b9588bb4bbef2c8914f83185984ee4622 mkinitfs_test.sh"

View file

@ -192,7 +192,7 @@ get_binaries()
# This gets called as $(get_osk_config), so the exit code can be checked/handled.
get_osk_config()
{
fontpath=$(awk '/^keyboard-font/{print $3}' /etc/osk.conf)
fontpath=$(awk '/^keyboard-font = /{print $3}' /etc/osk.conf)
if [ ! -f "$fontpath" ]; then
echo "ERROR: failed to parse 'keyboard-font' from osk-sdl config!"
exit 1