forked from mirrors/nixpkgs
Merge pull request #83911 from mkg20001/boot-persistence
stage-1-init: add boot.persistence option
This commit is contained in:
commit
b21c16fc5e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue