units: Use ImportCredential= where applicable

This commit is contained in:
Daan De Meyer 2023-06-08 14:09:36 +02:00
parent bbfb25f4b9
commit 1ab6ae1957
8 changed files with 19 additions and 26 deletions

View File

@ -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.*

View File

@ -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]

View File

@ -21,4 +21,4 @@ Type=oneshot
RemainAfterExit=yes
ExecStart={{ROOTLIBEXECDIR}}/systemd-sysctl
TimeoutSec=90s
LoadCredential=sysctl.extra
ImportCredential=sysctl.*

View File

@ -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.*

View File

@ -21,4 +21,4 @@ Type=oneshot
ExecStart=systemd-tmpfiles --clean
SuccessExitStatus=DATAERR
IOSchedulingClass=idle
LoadCredential=tmpfiles.extra
ImportCredential=tmpfiles.*

View File

@ -22,4 +22,4 @@ Type=oneshot
RemainAfterExit=yes
ExecStart=systemd-tmpfiles --prefix=/dev --create --boot --graceful
SuccessExitStatus=DATAERR CANTCREAT
LoadCredential=tmpfiles.extra
ImportCredential=tmpfiles.*

View File

@ -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

View File

@ -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.*