We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff6742c commit 385f3feCopy full SHA for 385f3fe
vm-systemd/bind-dirs.sh
@@ -117,8 +117,10 @@ bind_dirs() {
117
else
118
if [ -d "$fso_ro" ] || [ -f "$fso_ro" ]; then
119
## Initially copy over data directories to /rw if rw directory does not exist.
120
- echo "Initializing $rw_dest_dir with files from $fso_ro" >&2
121
- cp --archive --recursive --parents "$fso_ro" "$rw_dest_dir"
+ echo "Initializing $fso_rw with files from $fso_ro" >&2
+ parent_directory="$(dirname "$fso_rw")"
122
+ test -d "$parent_directory" || mkdir --parents "$parent_directory"
123
+ cp --archive --recursive "$fso_ro" "$fso_rw"
124
125
echo "$fso_ro is neither a directory nor a file and the path does not exist below /rw, skipping."
126
continue
0 commit comments