Bug#985975: systemd: Setting swap using swap.target impossible

Michael Biebl biebl at debian.org
Sat Mar 27 09:46:28 GMT 2021


Control: tags -1 + moreinfo

Hello Chris

Am 27.03.21 um 09:07 schrieb Chris Jackson:

> Attempting to create a .swap file in
> /etc/systemd/system/swap.target.wants/ yields the following warning when
> attempting `systemctl restart swap.target`
> 
> swap.target: Wants dependency dropin
> /etc/systemd/system/swap.target.wants/swapfile.swap is not a symlink,
> ignoring.
> 
> Creating a symlink to a .swap file located in /usr/local/lib/systemd
> yields the following:
> 
> /etc/systemd/system/swap.target.wants/./swapfile.swap: symlinks are not
> allowed for units of this type, rejecting.
> 
> Can't use a symlink, can't use a non-symlink eiter.

/usr/local/lib/systemd is not in systemd's search path for units (see 
"systemd-analyze unit-paths").

Please place the file either in /etc/systemd/system/ or
/usr/local/lib/systemd/system/. The former is probably a bit more 
suitable for local configuration like this.

Then create the symlink in /etc/systemd/system/swap.target.wants/

Please report back if that fixes your issue.

Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20210327/eaa9c9e7/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list