Skip to content
Snippets Groups Projects
Verified Commit 11375355 authored by Clayton Craft's avatar Clayton Craft :speech_balloon:
Browse files

main/postmarketos-initramfs: fix panic when booting with console=none

parent bce060be
No related branches found
No related tags found
No related merge requests found
Pipeline #208024 failed
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-initramfs
pkgver=2.7.0
pkgver=2.7.1
pkgrel=0
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
url="https://postmarketos.org"
......@@ -92,8 +92,8 @@ sha512sums="
5b364300f31c91fd0591eb0715f67cbf5383f45246a5fb9f34b79f7cb2e3b15768b2130e5f32f816cc169950f988c1beabc879ba31645c58ce131a288dbc071d 00-initramfs-base.dirs
0fed7dfdf940f5de15ca2fa636214d44ee8549afe5001b81beb0e337e865eb737916e158bc0ed7a7803adc81176386ae8edfc21150de62bb136fdfcdcb888b8b 00-initramfs-base.files
8a4adad3785af474b36a09a05f6a3b2c4b4f43aac331a53b903abfa51ea12be1e3d1d807b7a6e66a1346815f3b0044daf8cd62e21e2dc75d2db13ee265a72985 00-initramfs-extra-base.files
dd66ed22d443b3745fb7e26814cb87dcd2b8a3b42fa1090a8b3194e1cc14d2f3abf02b20b5166889df5bca238a8848c40ccfa084f12b1a8045c67d8e4fcbe464 init.sh
f52fb66513b54674899d4b9b3fa195d728dd1a03cf256d81b0171a7163230ab8492529700c40b7c9bf043e3e2a91812102d84ba74d75b078e57af6f19a0bfb29 init_functions.sh
8164fe021be844db00d282f1f2507d954de3a541999be24e4959128f7cedd36233d7c73411a5f3e8171b9d87706916835ffd8e4722196e48f863683e7e726fc0 init.sh
45bb75fe2a6c47b06cebc04ceda65cfec56fdb576ca3b247bc1c51b9b29dfeb4aa111256d395360e416fbb1dde4131c0d3b3d75fb55ebb3f0270ed5752799974 init_functions.sh
ba3275a9af788c7c782322a22a0f144d5e50e3498ea6886486a29331f23ae89cd32d500a3635cfa7cab369afba92edc18aeca64ccbf0cd589061cce23d15b46c unudhcpd.conf
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
"
......@@ -91,8 +91,11 @@ mount_boot_partition /sysroot/boot "rw"
init="/sbin/init"
setup_bootchart2
# Restore stdout and stderr to their original values
exec 1>&3 2>&4
# Restore stdout and stderr to their original values when the console is not
# null
if [ "$(readlink /proc/1/fd/0)" != "/dev/null"; then
exec 1>&3 2>&4
fi
# Re-enable kmsg ratelimiting (might have been disabled for logging)
echo ratelimit > /proc/sys/kernel/printk_devkmsg
......
......@@ -20,8 +20,11 @@ setup_log() {
# Spawn syslogd to log to the kernel
syslogd -K
# Stash fd1/2 so we can restore them before switch_root
exec 3>&1 4>&2
# Stash fd1/2 so we can restore them before switch_root, but only if the
# console is not null
if [ "$(readlink /proc/1/fd/0)" != "/dev/null"; then
exec 3>&1 4>&2
fi
local pmsg="/dev/pmsg0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment