Files
OpenBMC/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-static-norootfs-init/50-mount-persistent
T

21 lines
387 B
Bash
Raw Normal View History

2026-04-23 17:07:55 +08:00
#!/bin/sh
PERSIST=/run/mnt-persist
if [ ! -d $PERSIST ]; then
exit 0
fi
for m in var etc home/root; do
if [ ! -d $PERSIST/$m-data ]; then
mkdir -p $PERSIST/$m-data
fi
if [ ! -d $PERSIST/$m-work ]; then
mkdir -p $PERSIST/$m-work
fi
mount overlay /$m -t overlay -o \
lowerdir=/$m,upperdir=$PERSIST/$m-data,workdir=$PERSIST/$m-work
done