summaryrefslogtreecommitdiffstats
path: root/units (follow)
Commit message (Collapse)AuthorAgeFilesLines
* units: turn of ProtectHostname= again for services hat need to know about ↵Lennart Poettering2019-03-083-3/+0
| | | | | | | | | | | | | | system hostname changes ProtectHostname= turns off hostname change propagation from host to service. This means for services that care about the hostname and need to be able to notice changes to it it's not suitable (though it is useful for most other cases still). Let's turn it off hence for journald (which logs the current hostname) for networkd (which optionally sends the current hostname to dhcp servers) and resolved (which announces the current hostname via llmnr/mdns).
* units: fix systemd.special man page reference in system-update-cleanup.serviceMichael Biebl2019-03-071-1/+1
|
* logind: add support for booting into the boot menu or a specific boot menu entryLennart Poettering2019-03-051-1/+1
| | | | | | This behaves similar to the "boot into firmware" logic, and also allows either direct EFI operation (which sd-boot supports and others might support eventually too) or override through env var.
* units: re-drop ProtectHostname from systemd-hostnamed.service (#11792)Martin Pitt2019-02-221-1/+0
| | | | | | | | This was an overzealous setting from commit 99894b867f. Without this, `hostnamectl set-hostname` fails with Could not set property: Access denied as `sethostname()` fails with `EPERM`.
* man,units: link up new documentation about temporary directoriesLennart Poettering2019-02-201-1/+2
|
* Merge pull request #11682 from topimiettinen/private-utsnameLennart Poettering2019-02-2016-0/+16
|\ | | | | core: ProtectHostname feature
| * units: enable ProtectHostname=yesTopi Miettinen2019-02-2016-0/+16
| |
* | Merge pull request #11226 from keszybz/enable-remount-fs-dynamicallyLennart Poettering2019-02-182-3/+1
|\ \ | | | | | | Enable systemd-remount-fs.service dynamically
| * | Pull in systemd-remount-fs.service only when requiredZbigniew Jędrzejewski-Szmek2019-01-032-3/+1
| | | | | | | | | | | | | | | | | | Instead of enabling it unconditionally and then using ConditionPathExists=/etc/fstab, and possibly masking this condition if it should be enabled for auto gpt stuff, just pull it in explicitly when required.
* | | units: add usb-gadget targetAndrzej Pietrasiewicz2019-02-151-0/+12
| |/ |/| | | | | | | | | | | | | | | | | Linux can be run on a device meant to act as a USB peripheral. In order for a machine to act as such a USB device it has to be equipped with a UDC - USB Device Controller. This patch adds a target reached when UDC becomes available. It can be used for activating e.g. a service unit which composes a USB gadget with configfs and activates it.
* | units: make sure initrd-cleanup.service terminates before switching to rootfsFranck Bui2019-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A follow-up for commit a8cb1dc3e0fa81aff. Commit a8cb1dc3e0fa81aff made sure that initrd-cleanup.service won't be stopped when initrd-switch-root.target is isolated. However even with this change, it might happen that initrd-cleanup.service survives the switch to rootfs (since it has no ordering constraints against initrd-switch-root.target) and is stopped right after when default.target is isolated. This led to initrd-cleanup.service entering in failed state as it happens when oneshot services are stopped. This patch along with a8cb1dc3e0fa81aff should fix issue #4343. Fixes: #4343
* | units: drop conditionalization of systemd-tmpfiles-setup-dev.serviceLennart Poettering2019-01-261-1/+0
|/ | | | | | | | | | | | | | | | Currently, tmpfiles runs in two separate services at boot. /dev is populated by systemd-tmpfiles-setup-dev.service and everything else by systemd-tmpfiles-setup.service. The former was so far conditionalized by CAP_SYS_MODULES. The reasoning was that the primary purpose of populating /dev was to create device nodes based on the static device node info exported in kernel modules through MODALIAS. And without the privs to load kernel modules doing so is unnecessary. That thinking is incomplete however, as there might be reason to create stuff in /dev outside of the static modalias usecase. Thus, let's drop the conditionalization to ensure that tmpfiles.d rules are always executed at least once under all conditions. Fixes: #11544
* units: replace symlinks in units/user/ by real filesZbigniew Jędrzejewski-Szmek2018-12-138-8/+105
| | | | | | | | | | | | | | We already *install* those as real files since de78fa9ba0be55b01066ca5a716c6673d76b817b. Meson will start to copy symlinks as-is, so we would get dangling symlinks in /usr/lib/systemd/user/. I considered the layout in our sources to match the layout in the installation filesystem (i.e. creating units/system/ and moving all files from units/ to units/system/), but that seems overkill. By using normal files for both we get some duplication, but those files change rarely, so it's not a big downside in practice. Fixes #9906.
* units: drop units/user/busnames.targetZbigniew Jędrzejewski-Szmek2018-12-131-1/+0
| | | | It seems this was missed in 0ba89873372c3ab508852b4e0071da0719bcea0a.
* Merge pull request #10357 from poettering/import-fsZbigniew Jędrzejewski-Szmek2018-11-291-1/+6
|\ | | | | machinectl import-fs command and other fixes
| * import: drop logic of setting up /var/lib/machines as btrfs loopback mountLennart Poettering2018-11-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's simplify things and drop the logic that /var/lib/machines is setup as auto-growing btrfs loopback file /var/lib/machines.raw. THis was done in order to make quota available for machine management, but quite frankly never really worked properly, as we couldn't grow the file system in sync with its use properly. Moreover philosophically it's problematic overriding the admin's choice of file system like this. Let's hence drop this, and simplify things. Deleting code is a good feeling. Now that regular file systems provide project quota we could probably add per-machine quota support based on that, hence the btrfs quota argument is not that interesting anymore (though btrfs quota is a bit more powerful as it allows recursive quota, i.e. that the machine pool gets an overall quota in addition to per-machine quota).
* | units: make fsck/grows/makefs/makeswap units conflict against shutdown.targetLennart Poettering2018-11-262-0/+2
|/ | | | | | They are the only units we shipped/generated where this was missing really. Let's fix these. Follow-up for: #10933
* units: order systemd-rfkill.socket after /var/lib/systemd/rfkill (#10904)Lennart Poettering2018-11-241-1/+2
| | | | | | | | Otherwise we might install the socket unit early, but the service backing it late, and then end up in strange loops when we enter rescue mode, because we saw an event on /dev/rfkill but really can't dispatch it nor flush it. Fixes: #9171
* units: fix Description= of systemd-exit.serviceLennart Poettering2018-11-161-1/+1
| | | | | This file was probably copied from the --user version, let's use some more appropriate wording for the --system version.
* units: use correct command to exitLennart Poettering2018-11-161-1/+1
| | | | Otherwise we'll end a cyclic loop.
* units: add the same ordering deps for systemd-exit.service as for ↵Lennart Poettering2018-11-161-2/+2
| | | | | | | systemd-poweroff.service and friends This stuff runs in containers, and should really behave the same everywhere.
* Revert "units: lock down logind with fs namespacing options"Zbigniew Jędrzejewski-Szmek2018-11-151-9/+1
|
* Merge pull request #10744 from poettering/logind-lock-downLennart Poettering2018-11-131-1/+9
|\ | | | | units: lock down logind with fs namespacing options
| * units: lock down systemd-logind.service with various fs namespacing optionsLennart Poettering2018-11-121-0/+8
| | | | | | | | | | | | now that logind doesn't mount $XDG_RUNTIME_DIR anymore we can lock down the service using fs namespacing (as we don't need the mount to propagate to the host namespace anymore).
| * logind: drop CAP_KILL from caps bounding setLennart Poettering2018-11-121-1/+1
| | | | | | | | | | logind doesn't kill any processes anymore, hence let's drop the capability.
* | units: also change portabled's syscall filter to a whitelistLennart Poettering2018-11-131-1/+1
|/
* units: set NoNewPrivileges= for all long-running servicesLennart Poettering2018-11-1215-171/+186
| | | | | | | | | | | | | | | | | Previously, setting this option by default was problematic due to SELinux (as this would also prohibit the transition from PID1's label to the service's label). However, this restriction has since been lifted, hence let's start making use of this universally in our services. On SELinux system this change should be synchronized with a policy update that ensures that NNP-ful transitions from init_t to service labels is permitted. An while we are at it: sort the settings in the unit files this touches. This might increase the size of the change in this case, but hopefully should result in stabler patches later on. Fixes: #1219
* units: remove unused busnames.targetAlan Jenkins2018-10-311-12/+0
| | | | | | I found zero references to busnames.target, using git grep "busnames". (And we do not install using a wildcard units/*.*. There is no busnames.target installed on my Fedora 28 system).
* units: drop systemd-user-sessions.service ordering dep on ↵Lennart Poettering2018-10-241-3/+2
| | | | | | | | | systemd-journal-flush.service (#10502) THis dep existed since the unit was introduced, but I cannot see what good it would do. Hence in the interest of simplifying things, let's drop it. If breakages appear later we can certainly revert this again. Fixes: #10469
* units: add simple boot check unitLennart Poettering2018-10-192-0/+25
| | | | | | | | | This is might be useful in some cases, but it's primarily an example for a boot check service that can be plugged before boot-complete.target. It's disabled by default. All it does is check whether the failed unit count is zero
* add new systemd-bless-boot.service that marks boots as successfulLennart Poettering2018-10-192-0/+23
| | | | | | This is the counterpiece to the boot counting implemented in systemd-boot: if a boot is detected as successful we mark drop the counter again from the booted snippet or kernel image.
* units: add generic boot-complete.targetLennart Poettering2018-10-192-0/+15
|
* Merge pull request #10428 from keszybz/failure-actionsLennart Poettering2018-10-176-20/+8
|\ | | | | Implement manager status changes using SuccessAction=
| * units: allow and use SuccessAction=exit-force in system systemd-exit.serviceZbigniew Jędrzejewski-Szmek2018-10-172-5/+2
| | | | | | | | | | | | | | | | | | C.f. 287419c119ef961db487a281162ab037eba70c61: 'systemctl exit 42' can be used to set an exit value and pulls in exit.target, which pulls in systemd-exit.service, which calls org.fdo.Manager.Exit, which calls method_exit(), which sets the objective to MANAGER_EXIT. Allow the same to happen through SuccessAction=exit. v2: update for 'exit' and 'exit-force'
| * units: use SuccessAction=poweroff-force in systemd-poweroff.serviceZbigniew Jędrzejewski-Szmek2018-10-172-5/+2
| | | | | | | | | | | | | | Explicit systemctl calls remain in systemd-halt.service and the system systemd-exit.service. To convert systemd-halt, we'd need to add SuccessAction=halt-force. Halting doesn't make much sense, so let's just leave that is. systemd-exit.service will be converted in the next commit.
| * units: use SuccessAction=reboot-force in systemd-reboot.serviceZbigniew Jędrzejewski-Szmek2018-10-172-5/+2
| |
| * units: use SuccessAction=exit-force in systemd-exit.serviceZbigniew Jędrzejewski-Szmek2018-10-172-5/+2
| | | | | | | | | | | | | | | | Fixes #10414. v2: - rename .service.in to .service - rename 'exit' to 'exit-force'
* | meson: define @HIGH_RLIMIT_NOFILE@ and use it everywhereZbigniew Jędrzejewski-Szmek2018-10-175-5/+5
| |
* | units: bump the RLIMIT_NOFILE soft limit for all services that access the ↵Lennart Poettering2018-10-165-14/+16
|/ | | | | | | | | | | | | | journal This updates the unit files of all our serviecs that deal with journal stuff to use a higher RLIMIT_NOFILE soft limit by default. The new value is the same as used for the new HIGH_RLIMIT_NOFILE we just added. With this we ensure all code that access the journal has higher RLIMIT_NOFILE. The code that runs as daemon via the unit files, the code that is run from the user's command line via C code internal to the relevant tools. In some cases this means we'll redundantly bump the limits as there are tools run both from the command line and as service.
* units: use =yes rather than =true everywhereLennart Poettering2018-10-131-1/+1
| | | | | | So far we always used "yes" instead of "true" in all our unit files, except for one outlier. Let's do this here too. No change in behaviour whatsoever, except that it looks prettier ;-)
* logind: change user-runtime-dir to query runtime dir size from logind via ↵Lennart Poettering2018-10-131-2/+2
| | | | | | | | | | | | | | | | the bus I think this is a slightly cleaner approach than parsing the configuration file at multiple places, as this way there's only a single reload cycle for logind.conf, and that's systemd-logind.service's runtime. This means that logind and dbus become a requirement of user-runtime-dir, but given that XDG_RUNTIME_DIR is not set anyway without logind and dbus around this isn't really any limitation. This also simplifies linking a bit as this means user-runtime-dir doesn't have to link against any code of logind itself.
* units: improve Description= string a bitLennart Poettering2018-10-131-1/+1
| | | | | | Let's not use the word "wrapper", as it's not clear what that is, and in some way any unit file is a "wrapper"... let's simply say that it's about the runtime directory.
* units: set StopWhenUnneeded= for the user slice units tooLennart Poettering2018-10-131-0/+1
| | | | | We'd like them to go away, just like the user-runtime-dir@.service when they aren't needed anymore.
* Merge pull request #10117 from keszybz/undynamicifyLennart Poettering2018-10-053-6/+8
|\ | | | | Set DynamicUser=no for networkd, resolved, timesyncd
| * Revert "network: set DynamicUser= to systemd-networkd.service"Zbigniew Jędrzejewski-Szmek2018-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d4e9e574ea0b5d23598a317e68399584d229568b. (systemd.conf.m4 part was already reverted in 5b5d82615011b9827466b7cd5756da35627a1608.) Together those reverts should "fix" #10025 and #10011. ("fix" is in quotes because this doesn't really fix the underlying issue, which is combining DynamicUser= with strict container sandbox, but it avoids the problem by not using that feature in our default installation.) Dynamic users don't work well if the service requires matching configuration in other places, for example dbus policy. This is true for those three services. In effect, distros create the user statically [1, 2]. Dynamic users make more sense for "add-on" services where not creating the user, or more precisely, creating the user lazily, can save resources. For "basic" services, if we are going to create the user on package installation anyway, setting DynamicUser= just creates unneeded confusion. The only case where it is actually used is when somebody forgets to do system configuration. But it's better to have the service fail cleanly in this case too. If we want to turn on some side-effect of DynamicUser=yes for those services, we should just do that directly through fine-grained options. By not using DynamicUser= we also avoid the need to restart dbus. [1] https://salsa.debian.org/systemd-team/systemd/commit/bd9bf307274faca24699c0c2d67cb86f18c0b2cb [2] https://src.fedoraproject.org/rpms/systemd/blob/48ac1cebdedb055d9daf3dfe28c7bde80103f7a1/f/systemd.spec#_473 (Fedora does not create systemd-timesync user.)
| * Revert "resolve: enable DynamicUser= for systemd-resolved.service"Zbigniew Jędrzejewski-Szmek2018-09-201-2/+3
| | | | | | | | | | This reverts commit 0187368cadea183e18c6d575a9d6b7f491a402af. (systemd.conf.m4 part was already reverted in 5b5d82615011b9827466b7cd5756da35627a1608.)
| * Revert "timesyncd: enable DynamicUser="Zbigniew Jędrzejewski-Szmek2018-09-191-1/+2
| | | | | | | | | | | | | | This reverts commit 48d3e88c18258d423c3953372ec4a2e638ab0422. I kept the follow-symlink=false → follow-symlink=true change instact, since we're likely to have existing installations with a symlink now.
| * Revert "unit: drop After=systemd-sysusers.service from timesyncd"Zbigniew Jędrzejewski-Szmek2018-09-191-1/+1
| | | | | | | | This reverts commit be80154827100b19b6cc79a59323791b4f1a409f.
* | emergency: make sure console password agents don't interfere with the ↵Franck Bui2018-09-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emergency shell If for any reason local-fs.target fails at startup while a password is requested by systemd-cryptsetup@.service, we end up with the emergency shell competing with systemd-ask-password-console.service for the console. This patch makes sure that: - systemd-ask-password-console.service is stopped before entering in emergency mode so it won't make any access to the console while the emergency shell is running. - systemd-ask-password-console.path is also stopped so any attempts to restart systemd-cryptsetup in the emergency shell won't restart systemd-ask-password-console.service and kill the emergency shell. - systemd-ask-password-wall.path is stopped so systemd-ask-password-wall.service won't be started as this service pulls the default dependencies in. Fixes: #10131
* | tmpfiles: Order tmpfiles-setup after journaldJoão Paulo Rechi Vita2018-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systemd-tmpfiles-setup.service needs to be ordered after systemd-journald.service, so entries in /run/log/journal are already created when systemd-tmpfiles tries to adjust its permissions. This is specially problematic for setups using a volatile journal where the initrd does not ship a machine-id (i.e. OSTree-based systems), where logs from the initrd will be inaccessible for users in the systemd-journal group. It also has a side effect of `journalctl --user` failing with "No journal files were opened due to insufficient permissions". Fixes #10128.