Use devtmpfs, and improve finalize_fhs.sh

With this, finalize_fhs.sh can be rerun as needed, e.g. when rebooting.
Also, the preferred nameserver will persist after DHCP.

Thanks to devtmpfs, we no longer need to manage /dev once Linux is up.
This commit is contained in:
Gábor Stefanik 2024-01-02 00:05:58 +01:00
parent 133c05426c
commit 8341c4e089
4 changed files with 20 additions and 9 deletions

View file

@ -4,7 +4,11 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
set -ex
set -e
# mount might fail if /etc doesn't exist because of fstab and mtab
mkdir -p /dev /etc
mount -t devtmpfs none /dev &> /junk || true # no /dev/null yet
rm /junk &> /dev/null || true
# Create partition if it doesn't exist
if [ $(($(stat -c "%Lr" "/dev/${DISK}") % 8)) -eq 0 ]; then