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) set -- $(IFS==; echo $o)
stage2Init=$2 stage2Init=$2
;; ;;
boot.persistence=*)
set -- $(IFS==; echo $o)
persistence=$2
;;
boot.persistence.opt=*)
set -- $(IFS==; echo $o)
persistence_opt=$2
;;
boot.trace|debugtrace) boot.trace|debugtrace)
# Show each command. # Show each command.
set -x set -x
@ -534,6 +542,14 @@ while read -u 3 mountPoint; do
continue continue
fi 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" mountFS "$device" "$mountPoint" "$options" "$fsType"
done done