tmpfiles: skip an entry that takes its argument from a credential

A ^ after the type says the argument is the name of a credential to
read the real argument from.  Files from systemd have them:

    f^ /etc/hosts - - - - network.hosts

The ^ was not read, so on a system without /etc/hosts this made one
holding the text "network.hosts".

Finit has no credentials.  Skip the entry, which is what systemd does
when the credential is not set.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 19:10:04 +01:00
1 parent ddb4f18fa9
commit 81ce7a2833
4 files changed
+18 -3

No files matched your search

+2
View File
@@ -1381,6 +1381,8 @@ static void tmpfiles(char *line)
boot = 1;
else if (*mod == '?' && type[0] == 'L')
type[0] = 'l'; /* What Finit has had as l */
else if (*mod == '^')
return; /* Argument is a credential, there are none */
}
if (boot && !boot_flag)
return;