From: Daan De Meyer Date: Thu, 8 Jun 2023 12:09:36 +0000 (+0200) Subject: units: Use ImportCredential= where applicable X-Git-Tag: v254-rc1~244^2 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=1ab6ae19575c55d134ed630fa0e13874ce1a6de4 units: Use ImportCredential= where applicable --- diff --git a/units/systemd-firstboot.service b/units/systemd-firstboot.service index 984ebf282ad..0c8d574ef8b 100644 --- a/units/systemd-firstboot.service +++ b/units/systemd-firstboot.service @@ -32,10 +32,7 @@ StandardError=tty # Optionally, pick up basic fields from credentials passed to the service # manager. This is useful for importing this data from nspawn's # --set-credential= switch. -LoadCredential=passwd.hashed-password.root -LoadCredential=passwd.plaintext-password.root -LoadCredential=passwd.shell.root -LoadCredential=firstboot.locale -LoadCredential=firstboot.locale-messages -LoadCredential=firstboot.keymap -LoadCredential=firstboot.timezone +ImportCredential=passwd.hashed-password.root +ImportCredential=passwd.plaintext-password.root +ImportCredential=passwd.shell.root +ImportCredential=firstboot.* diff --git a/units/systemd-resolved.service.in b/units/systemd-resolved.service.in index 10ce49345e5..a078a9dd684 100644 --- a/units/systemd-resolved.service.in +++ b/units/systemd-resolved.service.in @@ -50,8 +50,8 @@ SystemCallErrorNumber=EPERM SystemCallFilter=@system-service Type=notify User=systemd-resolve -LoadCredential=network.dns -LoadCredential=network.search_domains +ImportCredential=network.dns +ImportCredential=network.search_domains {{SERVICE_WATCHDOG}} [Install] diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in index 77793f38948..7307601a7df 100644 --- a/units/systemd-sysctl.service.in +++ b/units/systemd-sysctl.service.in @@ -21,4 +21,4 @@ Type=oneshot RemainAfterExit=yes ExecStart={{ROOTLIBEXECDIR}}/systemd-sysctl TimeoutSec=90s -LoadCredential=sysctl.extra +ImportCredential=sysctl.* diff --git a/units/systemd-sysusers.service b/units/systemd-sysusers.service index 2ec27668416..84fd66de37a 100644 --- a/units/systemd-sysusers.service +++ b/units/systemd-sysusers.service @@ -29,9 +29,9 @@ TimeoutSec=90s # Optionally, pick up a root password and shell for the root user from a # credential passed to the service manager. This is useful for importing this # data from nspawn's --set-credential= switch. -LoadCredential=passwd.hashed-password.root -LoadCredential=passwd.plaintext-password.root -LoadCredential=passwd.shell.root +ImportCredential=passwd.hashed-password.root +ImportCredential=passwd.plaintext-password.root +ImportCredential=passwd.shell.root # Also, allow configuring extra sysusers lines via a credential -LoadCredential=sysusers.extra +ImportCredential=sysusers.* diff --git a/units/systemd-tmpfiles-clean.service b/units/systemd-tmpfiles-clean.service index 4163aef729b..7b0edba412b 100644 --- a/units/systemd-tmpfiles-clean.service +++ b/units/systemd-tmpfiles-clean.service @@ -21,4 +21,4 @@ Type=oneshot ExecStart=systemd-tmpfiles --clean SuccessExitStatus=DATAERR IOSchedulingClass=idle -LoadCredential=tmpfiles.extra +ImportCredential=tmpfiles.* diff --git a/units/systemd-tmpfiles-setup-dev.service b/units/systemd-tmpfiles-setup-dev.service index 635e840a488..acaa9510aa6 100644 --- a/units/systemd-tmpfiles-setup-dev.service +++ b/units/systemd-tmpfiles-setup-dev.service @@ -22,4 +22,4 @@ Type=oneshot RemainAfterExit=yes ExecStart=systemd-tmpfiles --prefix=/dev --create --boot --graceful SuccessExitStatus=DATAERR CANTCREAT -LoadCredential=tmpfiles.extra +ImportCredential=tmpfiles.* diff --git a/units/systemd-tmpfiles-setup.service b/units/systemd-tmpfiles-setup.service index 506f53eaa2f..6c5e3de8fd9 100644 --- a/units/systemd-tmpfiles-setup.service +++ b/units/systemd-tmpfiles-setup.service @@ -23,8 +23,8 @@ Type=oneshot RemainAfterExit=yes ExecStart=systemd-tmpfiles --create --remove --boot SuccessExitStatus=DATAERR CANTCREAT -LoadCredential=tmpfiles.extra -LoadCredential=login.motd -LoadCredential=login.issue -LoadCredential=network.hosts -LoadCredential=ssh.authorized_keys.root +ImportCredential=tmpfiles.* +ImportCredential=login.motd +ImportCredential=login.issue +ImportCredential=network.hosts +ImportCredential=ssh.authorized_keys.root diff --git a/units/systemd-vconsole-setup.service.in b/units/systemd-vconsole-setup.service.in index 41d738a63d4..0604ed0173c 100644 --- a/units/systemd-vconsole-setup.service.in +++ b/units/systemd-vconsole-setup.service.in @@ -21,8 +21,4 @@ Before=initrd-switch-root.target shutdown.target Type=oneshot RemainAfterExit=yes ExecStart={{ROOTLIBEXECDIR}}/systemd-vconsole-setup -LoadCredential=vconsole.keymap -LoadCredential=vconsole.keymap_toggle -LoadCredential=vconsole.font -LoadCredential=vconsole.font_map -LoadCredential=vconsole.font_unimap +ImportCredential=vconsole.*