pmaports/main/postmarketos-mkinitfs-hook-verbose-initfs/10-verbose-initfs.sh
Zhuowei Zhang 7df2c93459
main/postmarketos-mkinitfs: support verbose boot (!234)
Adds a new initfs hook, verbose-initfs, which doesn't do anything on its
own. Modify postmarketos-mkinitfs to check if this hook is installed and
if so run `set -x`.

It's done this way so verbose boot is enabled as early as possible,
before hooks are loaded.

Tested on the qemu-aarch64 device.

- pmboostrap initfs hook_add verbose-initfs
- pmbootstrap qemu --arch aarch64
- confirmed that commands are echoed to the console
2019-02-27 21:02:02 +01:00

5 lines
292 B
Bash

#!/bin/sh
# The verbose feature is actually implemented in postmarketos-mkinitfs itself
# since it needs to be enabled before hooks are run. /init checks if this file
# exists and runs "set -x" if so.
echo "verbose-initfs is enabled. All initramfs shell commands are printed to the console."