You are not logged in.
It says here:
https://man.archlinux.org/man/systemd.preset.5
Example 1. Default to off
# /usr/lib/systemd/system-preset/99-default.preset
disable *
This disables all units. Due to the filename prefix "99-", it will be read last and hence can easily be overridden by spin or administrator preset policy.
Example 3. A GNOME spin
# /usr/lib/systemd/system-preset/50-gnome.preset
enable gdm.service
enable colord.service
enable accounts-daemon.service
enable avahi-daemon.*
This enables the three mentioned units, plus all avahi-daemon regardless of which unit type. A file like this could be useful for inclusion in a GNOME spin of a distribution. It will ensure that the units necessary for GNOME are properly enabled as they are installed. It leaves all other units untouched, and subject to other (later) preset files, for example like the one from the first example above.
Below are the contents of
/usr/lib/systemd/system-preset/50-zfs.preset
# ZFS is enabled by default
enable zfs-import-cache.service
disable zfs-import-scan.service
enable zfs-import.target
enable zfs-mount.service
enable zfs-share.service
enable zfs-zed.service
enable zfs-volume-wait.service
enable zfs.target
Question: Based on the above I would expect that all but one of the zfs services and targets would be enabled, yet that is not happening. Any ideas why? I have yet no pool defined but don't know if that is relevant.
systemctl list-unit-files | grep zfs
zfs-import-cache.service disabled enabled
zfs-import-scan.service disabled disabled
zfs-import.service masked disabled
zfs-mount.service disabled enabled
zfs-share.service disabled enabled
zfs-volume-wait.service disabled enabled
zfs-zed.service disabled enabled
zfs-import.target disabled enabled
zfs-volumes.target disabled disabled
zfs.target disabled enabled
Last edited by archdub (2021-03-24 18:54:09)
Offline
systemctl preset is used by the post install scriptlets of RPM packages (or other OS package formats), to enable/disable specific units by default on package installation, enforcing distribution, spin or administrator preset policy.
Arch's /usr/share/libalpm/scripts/systemd-hook does not consider systemd presets.
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Thanks. That explains it.
I was thrown off track by the wiki, which seems to be outdated or wrong:
https://wiki.archlinux.org/index.php/Sy … by_default
Offline