base-files: mount pstore if present
authorBrian Norris <computersforpeace@gmail.com>
Sat, 23 Jan 2021 23:08:00 +0000 (15:08 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 29 Jan 2021 21:26:36 +0000 (22:26 +0100)
Pstore (persistent store) can be used to stash debug information (kernel
console, panics, ftrace) across reboots or crashes. If the filesystem is
present, mount it.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
package/base-files/files/etc/init.d/boot

index b36323a97e2a88d08893c6ebfbfee76e0b1e4c25..a1e8e828dd2b17006d59536e9f53887ebc001966 100755 (executable)
@@ -35,6 +35,7 @@ boot() {
        ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf
        grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
        grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf
+       grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore
        [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
 
        /sbin/kmodloader