Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding command line parameter to remove persistence.
- Loading branch information
1 parent
3a68424
commit 73d837a
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
#set -e | ||
|
||
Remove_persistence () | ||
{ | ||
for _PARAMETER in ${LIVE_BOOT_CMDLINE} | ||
do | ||
case "${_PARAMETER}" in | ||
live-boot.persistence-remove=*|persistence-remove=*) | ||
LIVE_PERSISTENCE_REMOVE="${_PARAMETER#*persistence-remove=}" | ||
;; | ||
|
||
live-boot.persistence-remove|persistence-remove) | ||
LIVE_PERSISTENCE_REMOVE="true" | ||
;; | ||
esac | ||
done | ||
|
||
case "${LIVE_PERSISTENCE_REMOVE}" in | ||
true) | ||
;; | ||
|
||
*) | ||
return 0 | ||
;; | ||
esac | ||
|
||
# Remove persistence | ||
cd /live/overlay && find . -not -name 'persistence.conf' | xargs rm -rf | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters