mirror of
https://github.com/systemd/systemd.git
synced 2025-03-06 00:58:29 +03:00
repart: Ignore copy failures for unsupported file types
e.g. vfat doesn't support symlinks, sockets, fifos, etc so let's ignore any copy failures related to unsupported file types when populating filesystems.
This commit is contained in:
parent
494f7fc096
commit
336ae0e71d
@ -420,6 +420,10 @@
|
|||||||
<para>The copy operation is executed before the file system is registered in the partition table,
|
<para>The copy operation is executed before the file system is registered in the partition table,
|
||||||
thus ensuring that a file system populated this way only ever exists fully initialized.</para>
|
thus ensuring that a file system populated this way only ever exists fully initialized.</para>
|
||||||
|
|
||||||
|
<para>Note that <varname>CopyFiles=</varname> will skip copying files that aren't supported by the
|
||||||
|
target filesystem (e.g symlinks, fifos, sockets and devices on vfat). When an unsupported file type
|
||||||
|
is encountered, repart will skip copying this file and write a log message about it.</para>
|
||||||
|
|
||||||
<para>This option cannot be combined with <varname>CopyBlocks=</varname>.</para>
|
<para>This option cannot be combined with <varname>CopyBlocks=</varname>.</para>
|
||||||
|
|
||||||
<para>When <command>systemd-repart</command> is invoked with the <option>--image=</option> or
|
<para>When <command>systemd-repart</command> is invoked with the <option>--image=</option> or
|
||||||
|
@ -3731,14 +3731,14 @@ static int do_copy_files(
|
|||||||
sfd, ".",
|
sfd, ".",
|
||||||
pfd, fn,
|
pfd, fn,
|
||||||
override_uid, override_gid,
|
override_uid, override_gid,
|
||||||
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS,
|
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS|COPY_GRACEFUL_WARN,
|
||||||
denylist);
|
denylist);
|
||||||
} else
|
} else
|
||||||
r = copy_tree_at(
|
r = copy_tree_at(
|
||||||
sfd, ".",
|
sfd, ".",
|
||||||
tfd, ".",
|
tfd, ".",
|
||||||
override_uid, override_gid,
|
override_uid, override_gid,
|
||||||
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS,
|
COPY_REFLINK|COPY_HOLES|COPY_MERGE|COPY_REPLACE|COPY_SIGINT|COPY_HARDLINKS|COPY_ALL_XATTRS|COPY_GRACEFUL_WARN,
|
||||||
denylist);
|
denylist);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to copy '%s%s' to '%s%s': %m",
|
return log_error_errno(r, "Failed to copy '%s%s' to '%s%s': %m",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user