Merge pull request #83911 from mkg20001/boot-persistence

stage-1-init: add boot.persistence option
This commit is contained in:
worldofpeace 2020-07-30 14:56:06 -04:00 committed by GitHub
commit b21c16fc5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,6 +144,14 @@ for o in $(cat /proc/cmdline); do
set -- $(IFS==; echo $o)
stage2Init=$2
;;
boot.persistence=*)
set -- $(IFS==; echo $o)
persistence=$2
;;
boot.persistence.opt=*)
set -- $(IFS==; echo $o)
persistence_opt=$2
;;
boot.trace|debugtrace)
# Show each command.
set -x
@ -534,6 +542,14 @@ while read -u 3 mountPoint; do
continue
fi
if [ "$mountPoint" = / ] && [ "$device" = tmpfs ] && [ ! -z "$persistence" ]; then
echo persistence...
waitDevice "$persistence"
echo enabling persistence...
mountFS "$persistence" "$mountPoint" "$persistence_opt" "auto"
continue
fi
mountFS "$device" "$mountPoint" "$options" "$fsType"
done