Skip to content

Commit

Permalink
bind-dirs: fix /rw/home and /rw/usrlocal initialization from template…
Browse files Browse the repository at this point in the history
… files
  • Loading branch information
Guiiix committed Feb 23, 2025
1 parent ff6742c commit 385f3fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vm-systemd/bind-dirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ bind_dirs() {
else
if [ -d "$fso_ro" ] || [ -f "$fso_ro" ]; then
## Initially copy over data directories to /rw if rw directory does not exist.
echo "Initializing $rw_dest_dir with files from $fso_ro" >&2
cp --archive --recursive --parents "$fso_ro" "$rw_dest_dir"
echo "Initializing $fso_rw with files from $fso_ro" >&2
parent_directory="$(dirname "$fso_rw")"
test -d "$parent_directory" || mkdir --parents "$parent_directory"
cp --archive --recursive "$fso_ro" "$fso_rw"
else
echo "$fso_ro is neither a directory nor a file and the path does not exist below /rw, skipping."
continue
Expand Down

0 comments on commit 385f3fe

Please sign in to comment.