diff --git a/main/postmarketos-base/APKBUILD b/main/postmarketos-base/APKBUILD index deb71bf4a..891788b0b 100644 --- a/main/postmarketos-base/APKBUILD +++ b/main/postmarketos-base/APKBUILD @@ -1,13 +1,13 @@ pkgname=postmarketos-base -pkgver=27 -pkgrel=1 +pkgver=28 +pkgrel=0 pkgdesc="Meta package for minimal postmarketOS base" url="https://postmarketos.org" arch="noarch" license="GPL-3.0-or-later" depends=" alpine-base - devicepkg-utils + devicepkg-utils>=0.2.0 eudev openssh postmarketos-bootsplash @@ -18,7 +18,7 @@ depends=" zram-init " install="$pkgname.post-install $pkgname.pre-upgrade $pkgname.post-upgrade" -triggers="$pkgname.trigger=/etc" +triggers="$pkgname.trigger=/usr/share/deviceinfo" subpackages=" $pkgname-mesa $pkgname-nftables diff --git a/main/postmarketos-base/postmarketos-base.trigger b/main/postmarketos-base/postmarketos-base.trigger index c4649bc7f..5d9975a69 100644 --- a/main/postmarketos-base/postmarketos-base.trigger +++ b/main/postmarketos-base/postmarketos-base.trigger @@ -1,38 +1,20 @@ #!/bin/sh -e -# Each argument to this shell script is a path that caused the trigger to execute. -# If /etc/deviceinfo was installed (which should be the case for any device) and -# deviceinfo_getty is set, then configure a getty. +deviceinfo_getty="" -deviceinfo="false" +# shellcheck disable=SC1091 +. /usr/share/misc/source_deviceinfo -for i in "$@"; do - case "$i" in - /etc) - if [ -f /etc/deviceinfo ]; then - deviceinfo="true" - fi - break ;; - esac -done +if [ -n "${deviceinfo_getty}" ]; then + port=$(echo "${deviceinfo_getty}" | cut -s -d ";" -f 1) + baudrate=$(echo "${deviceinfo_getty}" | cut -s -d ";" -f 2) -if [ "$deviceinfo" = "true" ]; then - deviceinfo_getty="" - - # shellcheck disable=SC1091 - . /usr/share/misc/source_deviceinfo - - if [ -n "${deviceinfo_getty}" ]; then - port=$(echo "${deviceinfo_getty}" | cut -s -d ";" -f 1) - baudrate=$(echo "${deviceinfo_getty}" | cut -s -d ";" -f 2) - - if [ -n "${port}" ] && [ -n "${baudrate}" ]; then - echo "Configuring a getty on port ${port} with baud rate ${baudrate}" - sed -i -e "s/#ttyS0::respawn:\/sbin\/getty -L ttyS0 115200 vt100/${port}::respawn:\/sbin\/getty -L ${port} ${baudrate} vt100/" /etc/inittab - else - echo "ERROR: Invalid value for deviceinfo_getty: ${deviceinfo_getty}" - exit 1 - fi + if [ -n "${port}" ] && [ -n "${baudrate}" ]; then + echo "Configuring a getty on port ${port} with baud rate ${baudrate}" + sed -i -e "s/#ttyS0::respawn:\/sbin\/getty -L ttyS0 115200 vt100/${port}::respawn:\/sbin\/getty -L ${port} ${baudrate} vt100/" /etc/inittab + else + echo "ERROR: Invalid value for deviceinfo_getty: ${deviceinfo_getty}" + exit 1 fi fi