Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions INSTALL/CreatePersistentImg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ print_usage() {
echo ' -s size in MB, default is 1024'
echo ' -t filesystem type, default is ext4 ext2/ext3/ext4/xfs are supported now'
echo ' -l label, default is casper-rw'
echo ' -c configfile name inside the persistence file. File content is "/ union"'
echo ' -c specify the path to the config file what to be put into the persistence file.'
echo ' If not exist, config file name is the path basename and file content is "/ union"'
echo ' -o outputfile name, default is persistence.dat'
echo ' -e enable encryption, disabled by default (only few distros support this)'
echo ''
Expand Down Expand Up @@ -125,7 +126,12 @@ if [ -n "$config" ]; then

mkdir ./persist_tmp_mnt
if mount $freeloop ./persist_tmp_mnt; then
echo '/ union' > ./persist_tmp_mnt/$config
config_name="${config##*/}"
if [ -f "$config" ]; then
cat "$config" > ./persist_tmp_mnt/$config_name
else
echo '/ union' > ./persist_tmp_mnt/$config_name
fi
sync
umount ./persist_tmp_mnt
fi
Expand Down