main/postmarketos-initramfs: add function to source deviceinfo (MR 4037)
As a preparation for #1836, move the sourcing of deviceinfo to its own function. This should allow to have a single point in the whole of the initramfs for the sourcing of the deviceinfo, instead of every script that needs it sourcing it. This allows to change the way deviceinfo is sourced in the future with a lot less effort.
This commit is contained in:
parent
beef607a81
commit
b26ba8784c
3 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
|
||||||
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||||
pkgname=postmarketos-initramfs
|
pkgname=postmarketos-initramfs
|
||||||
pkgver=1.0.2
|
pkgver=1.1.0
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
||||||
url="https://postmarketos.org"
|
url="https://postmarketos.org"
|
||||||
|
@ -67,6 +67,6 @@ bed319179bcd0b894d6267c7e73f2890db07bc07df71542936947dfb3bdb17fade8a7b4e7b577f27
|
||||||
399da6e61993f48c8a62c956bb15d294cac10bf003d84257efdf4a213ebc87bb51cdcd75c4675f51c3be832146b8f21a7c769bf3e94f574a5067f001662632a1 00-initramfs-base.dirs
|
399da6e61993f48c8a62c956bb15d294cac10bf003d84257efdf4a213ebc87bb51cdcd75c4675f51c3be832146b8f21a7c769bf3e94f574a5067f001662632a1 00-initramfs-base.dirs
|
||||||
3c47e9169ee8cfe78e1a554cf325962f5425c41a0125dcba8561f377d8c52cbfccdd791b269656478c92604644fb286b1ee8df42db9f5a771657e415da35e619 00-initramfs-base.files
|
3c47e9169ee8cfe78e1a554cf325962f5425c41a0125dcba8561f377d8c52cbfccdd791b269656478c92604644fb286b1ee8df42db9f5a771657e415da35e619 00-initramfs-base.files
|
||||||
e984cd3033ce8752ebc71127828b964b46259a5263c2ebfab32c1394b674bcff464862ff00b8e920d3d31386c54ca0b94f84bc77580d275ecfeea33e76c07ef4 00-initramfs-extra-base.files
|
e984cd3033ce8752ebc71127828b964b46259a5263c2ebfab32c1394b674bcff464862ff00b8e920d3d31386c54ca0b94f84bc77580d275ecfeea33e76c07ef4 00-initramfs-extra-base.files
|
||||||
347637ba837c75d2e7c5e93b10364de6a784d70067c65dcc3b95277f5feb89fc9b243822022b2380846dd977c4a3f6f96877f547e6ffc7cd3051845d7907d6a1 init.sh
|
db1fa42b738247bb75dc9242ba06ce3bb12a2225c5810fa580bea22ea85905ac1682759a7f51e27b272824957656ea58666a95b1b88724551ce1b0cab02cc783 init.sh
|
||||||
0325b91829a45d76c5606fec3af610ac0b138a81586ae3836058a773c10a6ed7c8b9090861cc8554c228956baa27dfe4b9edb5f7104673961649f65a878eb9dc init_functions.sh
|
a2c3e52b8e7b9763d42fd6b9a4e34962fe53dad8ea4a4a9422c21c2e234bfe3af50d5d2848440bb3a476b2a5882a9fbbc20e4cd10c61e92eaea55f16b6c4b3a7 init_functions.sh
|
||||||
"
|
"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
[ -e /hooks/10-verbose-initfs.sh ] && set -x
|
[ -e /hooks/10-verbose-initfs.sh ] && set -x
|
||||||
|
|
||||||
. /etc/deviceinfo
|
|
||||||
. ./init_functions.sh
|
. ./init_functions.sh
|
||||||
|
source_deviceinfo
|
||||||
|
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
/bin/busybox --install -s
|
/bin/busybox --install -s
|
||||||
|
|
|
@ -677,3 +677,8 @@ loop_forever() {
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source_deviceinfo() {
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /etc/deviceinfo
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue