armbian-install should do rsync --one-file-system

Any mounted directory should not be copied but also mounted on the new boot device when booting
This commit is contained in:
Igor Pecovnik 2024-02-25 22:12:54 +01:00 committed by Igor
parent 85eced8d64
commit c7aec57e1c

View File

@ -164,7 +164,7 @@ create_armbian()
# count files is needed for progress bar
dialog --title " $title " --backtitle "$backtitle" --infobox "\n Counting files ... few seconds." 5 60
TODO=$(rsync -ahvrltDn --delete --stats --exclude-from=$EX_LIST / "${TempDir}"/rootfs | grep "Number of files:"|awk '{print $4}' | tr -d '.,')
TODO=$(rsync -avx --delete --stats --exclude-from=$EX_LIST / "${TempDir}"/rootfs | grep "Number of files:"|awk '{print $4}' | tr -d '.,')
echo -e "\nCopying ${TODO} files to $2. \c" >> $logfile
# creating rootfs
@ -179,7 +179,7 @@ create_armbian()
# Launch rsync in background
{ \
rsync -avrltD --delete --exclude-from=$EX_LIST / "${TempDir}"/rootfs | \
rsync -avx --delete --exclude-from=$EX_LIST / "${TempDir}"/rootfs | \
nl | awk '{ printf "%.0f\n", 100*$1/"'"$TODO"'" }' \
> "${nsi_conn_progress}" ;
# create empty persistent journal directory if it exists before install
@ -225,7 +225,7 @@ create_armbian()
# run rsync again to silently catch outstanding changes between / and "${TempDir}"/rootfs/
dialog --title "$title" --backtitle "$backtitle" --infobox "\n Cleaning up ... Almost done." 5 60
rsync -avrltD --delete --exclude-from=$EX_LIST / "${TempDir}"/rootfs >/dev/null 2>&1
rsync -avx --delete --exclude-from=$EX_LIST / "${TempDir}"/rootfs >/dev/null 2>&1
# creating fstab from scratch
rm -f "${TempDir}"/rootfs/etc/fstab