diff options
36 files changed, 491 insertions, 529 deletions
@@ -63,3 +63,4 @@ Arnd Bergmann <arnd@arndb.de> Tom Rini <trini@kernel.crashing.org> Paul Mundt <lethal@linux-sh.org> Atul Sabharwal <atul.sabharwal@intel.com> +Daniel Machon <Danielmachon@live.dk> @@ -2,10 +2,6 @@ systemd System and Service Manager CHANGES WITH 228: - * When creating transient services via the bus API it is now - possible to pass in a set of file descriptors to use as - STDIN/STDOUT/STDERR for the invoked process. - * A number of properties previously only settable in unit files are now also available as properties to set when creating transient units programmatically via the bus, as it @@ -16,29 +12,9 @@ CHANGES WITH 228: ReadOnlyDirectories=, InaccessibleDirectories=, ProtectSystem=, ProtectHome=, RuntimeDirectory=. - * Any reference to /etc/mtab has been dropped from - systemd. The file has been obsolete since a while, but - systemd refused to work on systems where it was incorrectly - set up (it should be a symlink or non-existant). Please make - sure to update to util-linux 2.27.1 or newer in conjunction - with this systemd release, which also drops any reference to - /etc/mtab. If you maintain a distribution make sure that no - software you package still references it, as this is a - likely source of bugs. There's also a glibc bug pending, - asking for removal of any reference to the file: - - https://sourceware.org/bugzilla/show_bug.cgi?id=19108 - - * The compression framing format used by the journal or - coredump processing has changed to be in line with what the - official LZ4 tools generate. LZ4 compression support in - systemd was considered unsupported previously, as the format - was not compatible with the normal tools. With this release - this has changed now, and it is hence safe for downstream - distributions to turn it on. While not compressing as well - as the XZ,LZ4 is substantially faster, which makes - it a good default choice for the compression logic in the - journal and in coredump handling. + * When creating transient services via the bus API it is now + possible to pass in a set of file descriptors to use as + STDIN/STDOUT/STDERR for the invoked process. * Wherever systemd expects a calendar timestamp specification (like in journalctl's --since= and --until= switches) UTC @@ -49,6 +25,10 @@ CHANGES WITH 228: these additions also apply to recurring calendar event specification, such as OnCalendar= in timer units. + * journalctl gained a new "--sync" switch that asks the + journal daemon to write all so far unwritten log messages to + disk and sync the files, before returning. + * systemd-tmpfiles learned two new line types "q" and "Q" that operate like "v", but also set up a basic btrfs quota hierarchy when used on a btrfs file system with quota @@ -57,35 +37,96 @@ CHANGES WITH 228: * systemd-detect-virt gained a new --chroot switch to detect whether execution takes place in a chroot() environment. - * CPUAffinity= now takes CPU index ranges in addition to just + * CPUAffinity= now takes CPU index ranges in addition to individual indexes. + * The various memory-related resource limit settings (such as + LimitAS=) now understand the usual K, M, G, ... suffixes to + the base of 1024 (IEC). Similar, the time-related resource + limit settings understand the usual min, h, day, ... + suffixes now. + + * systemd-nspawn gained the new --network-veth-extra= switch + to define additional and arbitrarily-named virtual Ethernet + links between the host and the container. + + * A new service execution setting PassEnvironment= has been + added that allows importing select environment variables + from PID1's environment block into the environment block of + the service. + * systemd will now bump the net.unix.max_dgram_qlen to 512 by - default now (kernel default is 16). This is beneficial for - avoiding blocking on AF_UNIX/SOCK_DGRAM sockets since it + default now (the kernel default is 16). This is beneficial + for avoiding blocking on AF_UNIX/SOCK_DGRAM sockets since it allows substantially larger numbers of queued datagrams. This should increase the capability of systemd to parallelize boot-up, as logging and sd_notify() are unlikely to stall execution anymore. If you need to change the value from the new defaults, use the usual sysctl.d/ snippets. - * The various memory-related resource limit settings (such as - LimitAS=) now understand the usual K, M, G, ... suffixes to - the base of 1024 (IEC). Similar, the time-related settings - understand the usual min, h, day, ... suffixes now. + * The compression framing format used by the journal or + coredump processing has changed to be in line with what the + official LZ4 tools generate. LZ4 compression support in + systemd was considered unsupported previously, as the format + was not compatible with the normal tools. With this release + this has changed now, and it is hence safe for downstream + distributions to turn it on. While not compressing as well + as the XZ,LZ4 is substantially faster, which makes + it a good default choice for the compression logic in the + journal and in coredump handling. - * journalctl gained a new "--sync" switch that asks the - journal daemon to write all so far unwritten log messages to - disk and sync the files, before returning. + * Any reference to /etc/mtab has been dropped from + systemd. The file has been obsolete since a while, but + systemd refused to work on systems where it was incorrectly + set up (it should be a symlink or non-existant). Please make + sure to update to util-linux 2.27.1 or newer in conjunction + with this systemd release, which also drops any reference to + /etc/mtab. If you maintain a distribution make sure that no + software you package still references it, as this is a + likely source of bugs. There's also a glibc bug pending, + asking for removal of any reference to this obsolete file: + + https://sourceware.org/bugzilla/show_bug.cgi?id=19108 * Support for the ".snapshot" unit type has been removed. This feature turned out to be little useful and little used, and has now been removed from the core and from systemctl. - * A new service execution setting PassEnvironment= has been - added that allows importing select environment variables - from PID1's environment block into the environment block of - the service. + * In unit files the behaviour of %u, %U, %h, %s has + changed. These specifiers will now unconditionally resolve + to the various user database fields of the user that the + systemd instance is running as, instead of the user + configured in the specific unit via User=. Note that this + effectively doesn't change much, as resolving of these + specifiers was already turned off in the --system instance + of systemd, as we cannot do NSS lookups from PID 1. In the + --user instance of systemd these specifiers where correctly + resolved, but hardly made any sense, since the user instance + lacks privileges to do user switches anyway, and User= is + hence useless. Morever, even in the --user instance of + systemd behaviour was awkward as it would only take settings + from User= assignment placed before the specifier into + account. In order to unify and simplify the logic around + this the specifiers will now always resolve to the + credentials of the user invoking the manager (which in case + of PID 1 is the root user). + + Contributions from: Andrew Jones, Beniamino Galvani, Boyuan + Yang, Daniel Machon, Daniel Mack, David Herrmann, David + Reynolds, David Strauss, Dongsu Park, Evgeny Vereshchagin, + Filipe Brandenburger, Franck Bui, Hristo Venev, Iago López + Galeiras, Jan Engelhardt, Jan Janssen, Jan Synacek, Jesus + Ornelas Aguayo, Karel Zak, kayrus, Kay Sievers, Lennart + Poettering, Mantas Mikulėnas, Marcel Holtmann, Marcin Bachry, + Marcos Alano, Marcos Mello, Mark Theunissen, Martin Pitt, + Michael Marineau, Michael Olbrich, Michal Schmidt, Michal + Sekletar, Mirco Tischler, Nick Owens, Nicolas Cornu, Patrik + Flykt, Peter Hutterer, reverendhomer, Ronny Chevalier, + Sangjung Woo, Seong-ho Cho, Shawn Landden, Susant Sahani, + Thomas Haller, Thomas Hindoe Paaboel Andersen, Tom Gundersen, + Torstein Husebø, Vito Caputo, Zbigniew Jędrzejewski-Szmek + + -- Berlin, 2015-11-XX CHANGES WITH 227: @@ -36,12 +36,6 @@ Features: * PID1: find a way how we can reload unit file configuration for specific units only, without reloading the whole of systemd -* For services: replace the default Requires=basic.target with After=basic.target + Requires=sysinit.target. - -* drop "Overridable" dependency types - -* document precise effect of DefaultDependencies=yes - * add an explicit parser for LimitNICE= and LimitRTPRIO= that verifies the specified range and generates sane error messages for incorrect specifications. Also, for LimitNICE= maybe introduce a syntax such @@ -52,7 +46,7 @@ Features: * when we detect that there are waiting jobs but no running jobs, do something -* push CPUAffinity also into the "cpuset" cgroup controller (only after the cpuset controller got ported to the unified hierarchy) +* push CPUAffinity= also into the "cpuset" cgroup controller (only after the cpuset controller got ported to the unified hierarchy) * add a concept of RemainAfterExit= to scope units @@ -673,8 +667,6 @@ Features: - add new command to systemctl: "systemctl system-reexec" which reexecs as many daemons as virtually possible - systemctl enable: fail if target to alias into does not exist? maybe show how many units are enabled afterwards? - systemctl: "Journal has been rotated since unit was started." message is misleading - - support "systemctl stop foobar@.service" to stop all units matching a certain template - - Something is wrong with symlink handling of "autovt@.service" in "systemctl list-unit-files" - better error message if you run systemctl without systemd running - systemctl status output should should include list of triggering units and their status @@ -689,7 +681,6 @@ Features: o DST changes - Support 2012-02~4 as syntax for specifying the fourth to last day of the month. - calendarspec: support value ranges with ".." notation. Example: 2013-4..8-1 - - when parsing calendar timestamps support the UTC timezone (even if we will not support arbitrary timezone specs, support UTC itself certainly makes sense), also support syntaxes such as +0200 - Modulate timer frequency based on battery state * add libsystemd-password or so to query passwords during boot using the password agent logic @@ -749,8 +740,6 @@ Features: * introduce Type=pid-file -* change Requires=basic.target to RequisiteOverride=basic.target - * when breaking cycles drop sysv services first, then services from /run, then from /etc, then from /usr * ExecOnFailure=/usr/bin/foo @@ -769,8 +758,6 @@ Features: * add option to sockets to avoid activation. Instead just drop packets/connections, see http://cyberelk.net/tim/2012/02/15/portreserve-systemd-solution/ -* default unix qlen is too small (10). bump sysctl? add sockopt? - * save coredump in Windows/Mozilla minidump format * support crash reporting operation modes (https://live.gnome.org/GnomeOS/Design/Whiteboards/ProblemReporting) @@ -918,8 +905,6 @@ External: * drop accountsservice's StandardOutput=syslog and Type=dbus fields -* dbus upstream still refers to dbus.target and should not - * dbus: in fedora, make /var/lib/dbus/machine-id a symlink to /etc/machine-id * /usr/bin/service should actually show the new command line @@ -954,7 +939,3 @@ Regularly: * use secure_getenv() instead of getenv() where appropriate * link up selected blog stories from man pages and unit files Documentation= fields - -Scheduled for removal or fixing: - -* xxxOverridable dependencies (probably: fix) diff --git a/systemd-master/catalog/systemd.da.catalog b/catalog/systemd.da.catalog index dc3f8b552e..bd4d742d8a 100644 --- a/systemd-master/catalog/systemd.da.catalog +++ b/catalog/systemd.da.catalog @@ -1,261 +1,261 @@ -# This file is part of systemd.
-#
-# Copyright 2012 Lennart Poettering
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-#
-# systemd is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with systemd; If not, see <http://www.gnu.org/licenses/>.
-
-# Message catalog for systemd's own messages
-# Danish translation
-
-# The catalog format is documented on
-# http://www.freedesktop.org/wiki/Software/systemd/catalog
-
-# For an explanation why we do all this, see https://xkcd.com/1024/
-
--- f77379a8490b408bbe5f6940505a777b
-Subject: Journalen er blevet startet
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-System-journal processen har startet op, åbnet journal filerne for
-tilskrivning og er nu klar til at modtage anmodninger.
-
--- d93fb3c9c24d451a97cea615ce59c00b
-Subject: Journalen er blevet stoppet
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-System-journal processen er stoppet og har lukket alle aktive journal
-filer.
-
--- a596d6fe7bfa4994828e72309e95d61e
-Subject: Beskeder fra en service er blevet undertrykt
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: man:journald.conf(5)
-
-En service har logget for mange beskeder inden for en given tidsperiode.
-Beskeder fra omtalte service er blevet smidt væk.
-
-Kun beskeder fra omtalte service er smidt væk. Beskeder fra andre
-services er ikke påvirket.
-
-Grænsen for hvornår beskeder bliver smidt væk kan konfigureres
-med RateLimitInterval= og RateLimitBurst= i
-/etc/systemd/journald.conf. Se journald.conf(5) for detaljer herom.
-
--- e9bf28e6e834481bb6f48f548ad13606
-Subject: Journal beskeder er gået tabt
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Kernel beskeder er gået tabt da journal systemet ikke har været i stand
-til at håndtere dem hurtigt nok.
-
--- fc2e22bc6ee647b6b90729ab34a250b1
-Subject: Fejl-fil genereret for process @COREDUMP_PID@ (@COREDUMP_COMM@)
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: man:core(5)
-
-Process @COREDUMP_PID@ (@COREDUMP_COMM@) har lukket ned og genereret en
-fejl-fil.
-
-Dette indikerer som regel en programmeringsfejl i det nedlukkede program
-og burde blive reporteret som en bug til folkene bag
-
--- 8d45620c1a4348dbb17410da57c60c66
-Subject: En ny session @SESSION_ID@ er blevet lavet for bruger @USER_ID@
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-
-En ny session med ID @SESSION_ID@ er blevet lavet for brugeren @USER_ID@.
-
-Den ledende process for sessionen er @LEADER@.
-
--- 3354939424b4456d9802ca8333ed424a
-Subject: Session @SESSION_ID@ er blevet lukket ned
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-
-En session med ID @SESSION_ID@ er blevet lukket ned.
-
--- fcbefc5da23d428093f97c82a9290f7b
-Subject: En ny arbejdsstation $SEAT_ID@ er nu tilgængelig
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-
-En ny arbejdsstation @SEAT_ID@ er blevet konfigureret og er nu tilgængelig.
-
--- e7852bfe46784ed0accde04bc864c2d5
-Subject: Arbejdsstation @SEAT_ID@ er nu blevet fjernet
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
-
-En arbejdsstation @SEAT_ID@ er blevet fjernet og er ikke længere tilgængelig.
-
--- c7a787079b354eaaa9e77b371893cd27
-Subject: Tidsændring
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Systemtiden er blevet ændret til @REALTIME@ mikrosekunder efter d. 1. Januar 1970.
-
--- 45f82f4aef7a4bbf942ce861d1f20990
-Subject: Tidszoneændring til @TIMEZONE@
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Tidszonen for systemet er blevet ændret til @TIMEZONE@.
-
--- b07a249cd024414a82dd00cd181378ff
-Subject: Opstart af systemet er nu fuldført
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Alle system services i kø til at køre ved opstart, er blevet startet
-med success. Bemærk at dette ikke betyder at maskinen er i dvale, da
-services stadig kan være i gang med at færdiggøre deres opstart.
-
-Opstart af kernel tog @KERNEL_USEC@ mikrosekunder.
-
-Opstart af initrd tog @INITRD_USEC@ mikrosekunder.
-
-Opstart af userspace tog @USERSPACE_USEC@ mikrosekunder.
-
--- 6bbd95ee977941e497c48be27c254128
-Subject: System slumretilstand @SLEEP@ trådt i kraft
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-System er nu gået i @SLEEP@ slumretilstand.
-
--- 8811e6df2a8e40f58a94cea26f8ebf14
-Subject: System slumretilstand @SLEEP@ forladt
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Systemet har nu forladt @SLEEP@ slumretilstand.
-
--- 98268866d1d54a499c4e98921d93bc40
-Subject: Systemnedlukning påbegyndt
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Systemnedlukning er blevet påbegyndt. Nedlukningen er nu begyndt og
-alle system services er blevet afbrudt og alle filsystemer afmonteret.
-
--- 7d4958e842da4a758f6c1cdc7b36dcc5
-Subject: Enhed @UNIT@ har påbegyndt opstart
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ er begyndt at starte op.
-
--- 39f53479d3a045ac8e11786248231fbf
-Subject: Enhed @UNIT har færdiggjort opstart
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ er færdig med at starte op.
-
-Resultat for opstart er @RESULT@.
-
--- de5b426a63be47a7b6ac3eaac82e2f6f
-Subject: Enhed @UNIT@ har påbegyndt nedlukning
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ har påbegyndt nedlukning.
-
--- 9d1aaa27d60140bd96365438aad20286
-Subject: Enhed @UNIT@ har færdiggjort nedlukning
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ har færdiggjort nedlukning.
-
--- be02cf6855d2428ba40df7e9d022f03d
-Subject: Enhed @UNIT@ har fejlet
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ har fejlet.
-
-Resultatet er @RESULT@
-
--- d34d037fff1847e6ae669a370e694725
-Subject: Enhed @UNIT@ har påbegyndt genindlæsning af sin konfiguration
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ er begyndt at genindlæse sin konfiguration
-
--- 7b05ebc668384222baa8881179cfda54
-Subject: Enhed @UNIT@ har færdiggjort genindlæsning af sin konfiguration
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Enhed @UNIT@ er færdig med at genindlæse sin konfiguration
-
-Resultatet er: @RESULT@.
-
--- 641257651c1b4ec9a8624d7a40a9e1e7
-Subject: Process @EXECUTABLE@ kunne ikke eksekveres
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Processen @EXECUTABLE@ kunne ikke eksekveres og fejlede.
-
-Processens returnerede fejlkode er @ERRNO@.
-
--- 0027229ca0644181a76c4e92458afa2e
-Subject: Èn eller flere beskeder kunne ikke videresendes til syslog
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Èn eller flere beskeder kunne ikke videresendes til syslog servicen
-der kører side-om-side med journald. Dette indikerer typisk at syslog
-implementationen ikke har kunnet følge med mængden af ventende beskeder.
-
--- 1dee0369c7fc4736b7099b38ecb46ee7
-Subject: Monteringspunkt er ikke tomt
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Folderen @WHERE@ er specificeret som monteringspunkt (andet felt i
-/etc/fstab eller Where= feltet i systemd enhedsfil) men er ikke tom.
-Dette forstyrrer ikke monteringen, men de pre-eksisterende filer i folderen
-bliver utilgængelige. For at se de over-monterede filer; montér det
-underlæggende filsystem til en anden lokation.
-
--- 24d8d4452573402496068381a6312df2
-Subject: En virtuel maskine eller container er blevet startet
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Den virtuelle maskine @NAME@ med dens leder PID @LEADER@ er blevet
-startet og er klar til brug.
-
--- 58432bd3bace477cb514b56381b8a758
-Subject: En virtuel maskine eller container er blevet afbrudt
-Defined-By: systemd
-Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-
-Den virtuelle maskine @NAME@ med dens leder PID @LEADER@ er blevet
-nedlukket.
+# This file is part of systemd. +# +# Copyright 2012 Lennart Poettering +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# systemd is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with systemd; If not, see <http://www.gnu.org/licenses/>. + +# Message catalog for systemd's own messages +# Danish translation + +# The catalog format is documented on +# http://www.freedesktop.org/wiki/Software/systemd/catalog + +# For an explanation why we do all this, see https://xkcd.com/1024/ + +-- f77379a8490b408bbe5f6940505a777b +Subject: Journalen er blevet startet +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +System-journal processen har startet op, åbnet journal filerne for +tilskrivning og er nu klar til at modtage anmodninger. + +-- d93fb3c9c24d451a97cea615ce59c00b +Subject: Journalen er blevet stoppet +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +System-journal processen er stoppet og har lukket alle aktive journal +filer. + +-- a596d6fe7bfa4994828e72309e95d61e +Subject: Beskeder fra en service er blevet undertrykt +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +Documentation: man:journald.conf(5) + +En service har logget for mange beskeder inden for en given tidsperiode. +Beskeder fra omtalte service er blevet smidt væk. + +Kun beskeder fra omtalte service er smidt væk. Beskeder fra andre +services er ikke påvirket. + +Grænsen for hvornår beskeder bliver smidt væk kan konfigureres +med RateLimitInterval= og RateLimitBurst= i +/etc/systemd/journald.conf. Se journald.conf(5) for detaljer herom. + +-- e9bf28e6e834481bb6f48f548ad13606 +Subject: Journal beskeder er gået tabt +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Kernel beskeder er gået tabt da journal systemet ikke har været i stand +til at håndtere dem hurtigt nok. + +-- fc2e22bc6ee647b6b90729ab34a250b1 +Subject: Fejl-fil genereret for process @COREDUMP_PID@ (@COREDUMP_COMM@) +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +Documentation: man:core(5) + +Process @COREDUMP_PID@ (@COREDUMP_COMM@) har lukket ned og genereret en +fejl-fil. + +Dette indikerer som regel en programmeringsfejl i det nedlukkede program +og burde blive reporteret som en bug til folkene bag + +-- 8d45620c1a4348dbb17410da57c60c66 +Subject: En ny session @SESSION_ID@ er blevet lavet for bruger @USER_ID@ +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat + +En ny session med ID @SESSION_ID@ er blevet lavet for brugeren @USER_ID@. + +Den ledende process for sessionen er @LEADER@. + +-- 3354939424b4456d9802ca8333ed424a +Subject: Session @SESSION_ID@ er blevet lukket ned +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat + +En session med ID @SESSION_ID@ er blevet lukket ned. + +-- fcbefc5da23d428093f97c82a9290f7b +Subject: En ny arbejdsstation $SEAT_ID@ er nu tilgængelig +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat + +En ny arbejdsstation @SEAT_ID@ er blevet konfigureret og er nu tilgængelig. + +-- e7852bfe46784ed0accde04bc864c2d5 +Subject: Arbejdsstation @SEAT_ID@ er nu blevet fjernet +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel +Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat + +En arbejdsstation @SEAT_ID@ er blevet fjernet og er ikke længere tilgængelig. + +-- c7a787079b354eaaa9e77b371893cd27 +Subject: Tidsændring +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Systemtiden er blevet ændret til @REALTIME@ mikrosekunder efter d. 1. Januar 1970. + +-- 45f82f4aef7a4bbf942ce861d1f20990 +Subject: Tidszoneændring til @TIMEZONE@ +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Tidszonen for systemet er blevet ændret til @TIMEZONE@. + +-- b07a249cd024414a82dd00cd181378ff +Subject: Opstart af systemet er nu fuldført +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Alle system services i kø til at køre ved opstart, er blevet startet +med success. Bemærk at dette ikke betyder at maskinen er i dvale, da +services stadig kan være i gang med at færdiggøre deres opstart. + +Opstart af kernel tog @KERNEL_USEC@ mikrosekunder. + +Opstart af initrd tog @INITRD_USEC@ mikrosekunder. + +Opstart af userspace tog @USERSPACE_USEC@ mikrosekunder. + +-- 6bbd95ee977941e497c48be27c254128 +Subject: System slumretilstand @SLEEP@ trådt i kraft +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +System er nu gået i @SLEEP@ slumretilstand. + +-- 8811e6df2a8e40f58a94cea26f8ebf14 +Subject: System slumretilstand @SLEEP@ forladt +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Systemet har nu forladt @SLEEP@ slumretilstand. + +-- 98268866d1d54a499c4e98921d93bc40 +Subject: Systemnedlukning påbegyndt +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Systemnedlukning er blevet påbegyndt. Nedlukningen er nu begyndt og +alle system services er blevet afbrudt og alle filsystemer afmonteret. + +-- 7d4958e842da4a758f6c1cdc7b36dcc5 +Subject: Enhed @UNIT@ har påbegyndt opstart +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ er begyndt at starte op. + +-- 39f53479d3a045ac8e11786248231fbf +Subject: Enhed @UNIT har færdiggjort opstart +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ er færdig med at starte op. + +Resultat for opstart er @RESULT@. + +-- de5b426a63be47a7b6ac3eaac82e2f6f +Subject: Enhed @UNIT@ har påbegyndt nedlukning +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ har påbegyndt nedlukning. + +-- 9d1aaa27d60140bd96365438aad20286 +Subject: Enhed @UNIT@ har færdiggjort nedlukning +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ har færdiggjort nedlukning. + +-- be02cf6855d2428ba40df7e9d022f03d +Subject: Enhed @UNIT@ har fejlet +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ har fejlet. + +Resultatet er @RESULT@ + +-- d34d037fff1847e6ae669a370e694725 +Subject: Enhed @UNIT@ har påbegyndt genindlæsning af sin konfiguration +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ er begyndt at genindlæse sin konfiguration + +-- 7b05ebc668384222baa8881179cfda54 +Subject: Enhed @UNIT@ har færdiggjort genindlæsning af sin konfiguration +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Enhed @UNIT@ er færdig med at genindlæse sin konfiguration + +Resultatet er: @RESULT@. + +-- 641257651c1b4ec9a8624d7a40a9e1e7 +Subject: Process @EXECUTABLE@ kunne ikke eksekveres +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Processen @EXECUTABLE@ kunne ikke eksekveres og fejlede. + +Processens returnerede fejlkode er @ERRNO@. + +-- 0027229ca0644181a76c4e92458afa2e +Subject: Èn eller flere beskeder kunne ikke videresendes til syslog +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Èn eller flere beskeder kunne ikke videresendes til syslog servicen +der kører side-om-side med journald. Dette indikerer typisk at syslog +implementationen ikke har kunnet følge med mængden af ventende beskeder. + +-- 1dee0369c7fc4736b7099b38ecb46ee7 +Subject: Monteringspunkt er ikke tomt +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Folderen @WHERE@ er specificeret som monteringspunkt (andet felt i +/etc/fstab eller Where= feltet i systemd enhedsfil) men er ikke tom. +Dette forstyrrer ikke monteringen, men de pre-eksisterende filer i folderen +bliver utilgængelige. For at se de over-monterede filer; montér det +underlæggende filsystem til en anden lokation. + +-- 24d8d4452573402496068381a6312df2 +Subject: En virtuel maskine eller container er blevet startet +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Den virtuelle maskine @NAME@ med dens leder PID @LEADER@ er blevet +startet og er klar til brug. + +-- 58432bd3bace477cb514b56381b8a758 +Subject: En virtuel maskine eller container er blevet afbrudt +Defined-By: systemd +Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel + +Den virtuelle maskine @NAME@ med dens leder PID @LEADER@ er blevet +nedlukket. diff --git a/man/systemctl.xml b/man/systemctl.xml index 3b9a7a604b..755a74f987 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -179,7 +179,6 @@ <command>list-dependencies</command>, i.e. follow dependencies of type <varname>WantedBy=</varname>, <varname>RequiredBy=</varname>, - <varname>RequiredByOverridable=</varname>, <varname>PartOf=</varname>, <varname>BoundBy=</varname>, instead of <varname>Wants=</varname> and similar. </para> @@ -932,9 +931,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service <para>Shows units required and wanted by the specified unit. This recursively lists units following the <varname>Requires=</varname>, - <varname>RequiresOverridable=</varname>, <varname>Requisite=</varname>, - <varname>RequisiteOverridable=</varname>, <varname>ConsistsOf=</varname>, <varname>Wants=</varname>, <varname>BindsTo=</varname> dependencies. If no unit is specified, diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml index f55c6fb7f3..bc37765dff 100644 --- a/man/systemd-analyze.xml +++ b/man/systemd-analyze.xml @@ -226,9 +226,7 @@ <varname>After=</varname> or <varname>Before=</varname> are shown. If <option>--require</option> is passed, only dependencies of type <varname>Requires=</varname>, - <varname>RequiresOverridable=</varname>, <varname>Requisite=</varname>, - <varname>RequisiteOverridable=</varname>, <varname>Wants=</varname> and <varname>Conflicts=</varname> are shown. If neither is passed, this shows dependencies of all these types.</para></listitem> diff --git a/man/systemd.target.xml b/man/systemd.target.xml index 54a5f5035c..bd4ab3903e 100644 --- a/man/systemd.target.xml +++ b/man/systemd.target.xml @@ -85,8 +85,7 @@ <para>Unless <varname>DefaultDependencies=</varname> is set to <option>no</option>, target units will implicitly complement all configured dependencies of type <varname>Wants=</varname>, - <varname>Requires=</varname>, - <varname>RequiresOverridable=</varname> with dependencies of type + <varname>Requires=</varname> with dependencies of type <varname>After=</varname>, unless an ordering dependency of any kind between the target and the respective other unit is already in place. Note that this behaviour is disabled if either unit has diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml index a20bd90797..5b12378eda 100644 --- a/man/systemd.unit.xml +++ b/man/systemd.unit.xml @@ -452,27 +452,9 @@ </varlistentry> <varlistentry> - <term><varname>RequiresOverridable=</varname></term> - - <listitem><para>Similar to <varname>Requires=</varname>. - Dependencies listed in <varname>RequiresOverridable=</varname> - which cannot be fulfilled or fail to start are ignored if the - startup was explicitly requested by the user. If the start-up - was pulled in indirectly by some dependency or automatic - start-up of units that is not requested by the user, this - dependency must be fulfilled and otherwise the transaction - fails. Hence, this option may be used to configure - dependencies that are normally honored unless the user - explicitly starts up the unit, in which case whether they - failed or not is irrelevant.</para></listitem> - - </varlistentry> - <varlistentry> <term><varname>Requisite=</varname></term> - <term><varname>RequisiteOverridable=</varname></term> - <listitem><para>Similar to <varname>Requires=</varname> and - <varname>RequiresOverridable=</varname>, respectively. + <listitem><para>Similar to <varname>Requires=</varname>. However, if the units listed here are not started already, they will not be started and the transaction will fail immediately. </para></listitem> diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c index a377996a37..deb102c22c 100644 --- a/src/analyze/analyze-verify.c +++ b/src/analyze/analyze-verify.c @@ -23,6 +23,7 @@ #include "alloc-util.h" #include "analyze-verify.h" +#include "bus-error.h" #include "bus-util.h" #include "log.h" #include "manager.h" @@ -164,7 +165,6 @@ static int verify_documentation(Unit *u, bool check_man) { static int verify_unit(Unit *u, bool check_man) { _cleanup_bus_error_free_ sd_bus_error err = SD_BUS_ERROR_NULL; - Job *j; int r, k; assert(u); @@ -173,11 +173,9 @@ static int verify_unit(Unit *u, bool check_man) { unit_dump(u, stdout, "\t"); log_unit_debug(u, "Creating %s/start job", u->id); - r = manager_add_job(u->manager, JOB_START, u, JOB_REPLACE, false, &err, &j); - if (sd_bus_error_is_set(&err)) - log_unit_error(u, "Error: %s: %s", err.name, err.message); + r = manager_add_job(u->manager, JOB_START, u, JOB_REPLACE, &err, NULL); if (r < 0) - log_unit_error_errno(u, r, "Failed to create %s/start: %m", u->id); + log_unit_error_errno(u, r, "Failed to create %s/start: %s", u->id, bus_error_message(&err, r)); k = verify_socket(u); if (k < 0 && r == 0) diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 27ead903e9..b7e45dcfd6 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -1076,12 +1076,6 @@ static int graph_one(sd_bus *bus, const UnitInfo *u, char *patterns[], char *fro r = graph_one_property(bus, u, "Requires", "black", patterns, from_patterns, to_patterns); if (r < 0) return r; - r = graph_one_property(bus, u, "RequiresOverridable", "black", patterns, from_patterns, to_patterns); - if (r < 0) - return r; - r = graph_one_property(bus, u, "RequisiteOverridable", "darkblue", patterns, from_patterns, to_patterns); - if (r < 0) - return r; r = graph_one_property(bus, u, "Wants", "grey66", patterns, from_patterns, to_patterns); if (r < 0) return r; diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c index 5007ecf1a4..9a55eacbfb 100644 --- a/src/basic/unit-name.c +++ b/src/basic/unit-name.c @@ -1000,16 +1000,12 @@ DEFINE_STRING_TABLE_LOOKUP(timer_state, TimerState); static const char* const unit_dependency_table[_UNIT_DEPENDENCY_MAX] = { [UNIT_REQUIRES] = "Requires", - [UNIT_REQUIRES_OVERRIDABLE] = "RequiresOverridable", [UNIT_REQUISITE] = "Requisite", - [UNIT_REQUISITE_OVERRIDABLE] = "RequisiteOverridable", [UNIT_WANTS] = "Wants", [UNIT_BINDS_TO] = "BindsTo", [UNIT_PART_OF] = "PartOf", [UNIT_REQUIRED_BY] = "RequiredBy", - [UNIT_REQUIRED_BY_OVERRIDABLE] = "RequiredByOverridable", [UNIT_REQUISITE_OF] = "RequisiteOf", - [UNIT_REQUISITE_OF_OVERRIDABLE] = "RequisiteOfOverridable", [UNIT_WANTED_BY] = "WantedBy", [UNIT_BOUND_BY] = "BoundBy", [UNIT_CONSISTS_OF] = "ConsistsOf", diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h index 5f6d8299c5..03c1a6e4ac 100644 --- a/src/basic/unit-name.h +++ b/src/basic/unit-name.h @@ -218,18 +218,14 @@ typedef enum TimerState { typedef enum UnitDependency { /* Positive dependencies */ UNIT_REQUIRES, - UNIT_REQUIRES_OVERRIDABLE, UNIT_REQUISITE, - UNIT_REQUISITE_OVERRIDABLE, UNIT_WANTS, UNIT_BINDS_TO, UNIT_PART_OF, /* Inverse of the above */ UNIT_REQUIRED_BY, /* inverse of 'requires' is 'required_by' */ - UNIT_REQUIRED_BY_OVERRIDABLE, /* inverse of 'requires_overridable' is 'required_by_overridable' */ UNIT_REQUISITE_OF, /* inverse of 'requisite' is 'requisite_of' */ - UNIT_REQUISITE_OF_OVERRIDABLE,/* inverse of 'requisite_overridable' is 'requisite_of_overridable' */ UNIT_WANTED_BY, /* inverse of 'wants' */ UNIT_BOUND_BY, /* inverse of 'binds_to' */ UNIT_CONSISTS_OF, /* inverse of 'part_of' */ diff --git a/src/core/automount.c b/src/core/automount.c index 41ead117c8..85b7b4e842 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -728,8 +728,7 @@ static void automount_enter_runnning(Automount *a) { if (!S_ISDIR(st.st_mode) || st.st_dev != a->dev_id) log_unit_info(UNIT(a), "Automount point already active?"); else { - r = manager_add_job(UNIT(a)->manager, JOB_START, UNIT_TRIGGER(UNIT(a)), - JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(a)->manager, JOB_START, UNIT_TRIGGER(UNIT(a)), JOB_REPLACE, &error, NULL); if (r < 0) { log_unit_warning(UNIT(a), "Failed to queue mount startup job: %s", bus_error_message(&error, r)); goto fail; @@ -974,7 +973,7 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo break; } - r = manager_add_job(UNIT(a)->manager, JOB_STOP, UNIT_TRIGGER(UNIT(a)), JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(a)->manager, JOB_STOP, UNIT_TRIGGER(UNIT(a)), JOB_REPLACE, &error, NULL); if (r < 0) { log_unit_warning(UNIT(a), "Failed to queue umount startup job: %s", bus_error_message(&error, r)); goto fail; diff --git a/src/core/busname.c b/src/core/busname.c index 68508e20d2..04fa12a4da 100644 --- a/src/core/busname.c +++ b/src/core/busname.c @@ -596,7 +596,7 @@ static void busname_enter_running(BusName *n) { goto fail; } - r = manager_add_job(UNIT(n)->manager, JOB_START, UNIT_DEREF(n->service), JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(n)->manager, JOB_START, UNIT_DEREF(n->service), JOB_REPLACE, &error, NULL); if (r < 0) goto fail; } diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 827e13497a..d9b7382c82 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -118,6 +118,22 @@ static int property_get_dependencies( return sd_bus_message_close_container(reply); } +static int property_get_obsolete_dependencies( + sd_bus *bus, + const char *path, + const char *interface, + const char *property, + sd_bus_message *reply, + void *userdata, + sd_bus_error *error) { + + assert(bus); + assert(reply); + + /* For dependency types we don't support anymore always return an empty array */ + return sd_bus_message_append(reply, "as", 0); +} + static int property_get_description( sd_bus *bus, const char *path, @@ -621,16 +637,12 @@ const sd_bus_vtable bus_unit_vtable[] = { SD_BUS_PROPERTY("Names", "as", property_get_names, 0, SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Following", "s", property_get_following, 0, 0), SD_BUS_PROPERTY("Requires", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUIRES]), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_PROPERTY("RequiresOverridable", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUIRES_OVERRIDABLE]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Requisite", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUISITE]), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_PROPERTY("RequisiteOverridable", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUISITE_OVERRIDABLE]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Wants", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_WANTS]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("BindsTo", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_BINDS_TO]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("PartOf", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_PART_OF]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("RequiredBy", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUIRED_BY]), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_PROPERTY("RequiredByOverridable", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUIRED_BY_OVERRIDABLE]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("RequisiteOf", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUISITE_OF]), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_PROPERTY("RequisiteOfOverridable", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_REQUISITE_OF_OVERRIDABLE]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("WantedBy", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_WANTED_BY]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("BoundBy", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_BOUND_BY]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("ConsistsOf", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_CONSISTS_OF]), SD_BUS_VTABLE_PROPERTY_CONST), @@ -644,6 +656,10 @@ const sd_bus_vtable bus_unit_vtable[] = { SD_BUS_PROPERTY("PropagatesReloadTo", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_PROPAGATES_RELOAD_TO]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("ReloadPropagatedFrom", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_RELOAD_PROPAGATED_FROM]), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("JoinsNamespaceOf", "as", property_get_dependencies, offsetof(Unit, dependencies[UNIT_JOINS_NAMESPACE_OF]), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("RequiresOverridable", "as", property_get_obsolete_dependencies, 0, SD_BUS_VTABLE_HIDDEN), + SD_BUS_PROPERTY("RequisiteOverridable", "as", property_get_obsolete_dependencies, 0, SD_BUS_VTABLE_HIDDEN), + SD_BUS_PROPERTY("RequiredByOverridable", "as", property_get_obsolete_dependencies, 0, SD_BUS_VTABLE_HIDDEN), + SD_BUS_PROPERTY("RequisiteOfOverridable", "as", property_get_obsolete_dependencies, 0, SD_BUS_VTABLE_HIDDEN), SD_BUS_PROPERTY("RequiresMountsFor", "as", NULL, offsetof(Unit, requires_mounts_for), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Documentation", "as", NULL, offsetof(Unit, documentation), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("Description", "s", property_get_description, 0, SD_BUS_VTABLE_PROPERTY_CONST), @@ -992,7 +1008,7 @@ int bus_unit_queue_job( (type == JOB_RELOAD_OR_START && job_type_collapse(type, u) == JOB_START && u->refuse_manual_start)) return sd_bus_error_setf(error, BUS_ERROR_ONLY_BY_DEPENDENCY, "Operation refused, unit %s may be requested by dependency only.", u->id); - r = manager_add_job(u->manager, type, u, mode, true, error, &j); + r = manager_add_job(u->manager, type, u, mode, error, &j); if (r < 0) return r; @@ -1108,9 +1124,15 @@ static int bus_unit_set_transient_property( UnitDependency d; const char *other; - d = unit_dependency_from_string(name); - if (d < 0) - return -EINVAL; + if (streq(name, "RequiresOverridable")) + d = UNIT_REQUIRES; /* redirect for obsolete unit dependency type */ + else if (streq(name, "RequisiteOverridable")) + d = UNIT_REQUISITE; /* same here */ + else { + d = unit_dependency_from_string(name); + if (d < 0) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid unit dependency: %s", name); + } r = sd_bus_message_enter_container(message, 'a', "s"); if (r < 0) diff --git a/src/core/dbus.c b/src/core/dbus.c index 6c44b28adf..7932130036 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -177,7 +177,7 @@ static int signal_activation_request(sd_bus_message *message, void *userdata, sd goto failed; } - r = manager_add_job(m, JOB_START, u, JOB_REPLACE, true, &error, NULL); + r = manager_add_job(m, JOB_START, u, JOB_REPLACE, &error, NULL); if (r < 0) goto failed; diff --git a/src/core/failure-action.c b/src/core/failure-action.c index c7c95984b7..f67fb05af0 100644 --- a/src/core/failure-action.c +++ b/src/core/failure-action.c @@ -42,8 +42,6 @@ int failure_action( FailureAction action, const char *reboot_arg) { - int r; - assert(m); assert(action >= 0); assert(action < _FAILURE_ACTION_MAX); @@ -62,18 +60,13 @@ int failure_action( switch (action) { - case FAILURE_ACTION_REBOOT: { - _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - + case FAILURE_ACTION_REBOOT: log_and_status(m, "Rebooting as result of failure."); update_reboot_param_file(reboot_arg); - r = manager_add_job_by_name(m, JOB_START, SPECIAL_REBOOT_TARGET, JOB_REPLACE, true, &error, NULL); - if (r < 0) - log_error("Failed to reboot: %s.", bus_error_message(&error, r)); + (void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_REBOOT_TARGET, JOB_REPLACE, NULL); break; - } case FAILURE_ACTION_REBOOT_FORCE: log_and_status(m, "Forcibly rebooting as result of failure."); @@ -96,17 +89,10 @@ int failure_action( reboot(RB_AUTOBOOT); break; - case FAILURE_ACTION_POWEROFF: { - _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; - + case FAILURE_ACTION_POWEROFF: log_and_status(m, "Powering off as result of failure."); - - r = manager_add_job_by_name(m, JOB_START, SPECIAL_POWEROFF_TARGET, JOB_REPLACE, true, &error, NULL); - if (r < 0) - log_error("Failed to poweroff: %s.", bus_error_message(&error, r)); - + (void) manager_add_job_by_name_and_warn(m, JOB_START, SPECIAL_POWEROFF_TARGET, JOB_REPLACE, NULL); break; - } case FAILURE_ACTION_POWEROFF_FORCE: log_and_status(m, "Forcibly powering off as result of failure."); diff --git a/src/core/job.c b/src/core/job.c index 120381fc3b..53e0947215 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -175,7 +175,6 @@ static void job_merge_into_installed(Job *j, Job *other) { else assert(other->type == JOB_NOP); - j->override = j->override || other->override; j->irreversible = j->irreversible || other->irreversible; j->ignore_order = j->ignore_order || other->ignore_order; } @@ -307,12 +306,10 @@ void job_dump(Job *j, FILE*f, const char *prefix) { "%s-> Job %u:\n" "%s\tAction: %s -> %s\n" "%s\tState: %s\n" - "%s\tForced: %s\n" "%s\tIrreversible: %s\n", prefix, j->id, prefix, j->unit->id, job_type_to_string(j->type), prefix, job_state_to_string(j->state), - prefix, yes_no(j->override), prefix, yes_no(j->irreversible)); } @@ -841,8 +838,6 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive) { job_fail_dependencies(u, UNIT_REQUIRED_BY); job_fail_dependencies(u, UNIT_REQUISITE_OF); job_fail_dependencies(u, UNIT_BOUND_BY); - job_fail_dependencies(u, UNIT_REQUIRED_BY_OVERRIDABLE); - job_fail_dependencies(u, UNIT_REQUISITE_OF_OVERRIDABLE); } else if (t == JOB_STOP) job_fail_dependencies(u, UNIT_CONFLICTED_BY); } @@ -967,7 +962,6 @@ int job_serialize(Job *j, FILE *f, FDSet *fds) { fprintf(f, "job-id=%u\n", j->id); fprintf(f, "job-type=%s\n", job_type_to_string(j->type)); fprintf(f, "job-state=%s\n", job_state_to_string(j->state)); - fprintf(f, "job-override=%s\n", yes_no(j->override)); fprintf(f, "job-irreversible=%s\n", yes_no(j->irreversible)); fprintf(f, "job-sent-dbus-new-signal=%s\n", yes_no(j->sent_dbus_new_signal)); fprintf(f, "job-ignore-order=%s\n", yes_no(j->ignore_order)); @@ -1035,15 +1029,6 @@ int job_deserialize(Job *j, FILE *f, FDSet *fds) { else job_set_state(j, s); - } else if (streq(l, "job-override")) { - int b; - - b = parse_boolean(v); - if (b < 0) - log_debug("Failed to parse job override flag %s", v); - else - j->override = j->override || b; - } else if (streq(l, "job-irreversible")) { int b; diff --git a/src/core/job.h b/src/core/job.h index 350e9f385f..60d8bd4f3e 100644 --- a/src/core/job.h +++ b/src/core/job.h @@ -162,7 +162,6 @@ struct Job { bool installed:1; bool in_run_queue:1; bool matters_to_anchor:1; - bool override:1; bool in_dbus_queue:1; bool sent_dbus_new_signal:1; bool ignore_order:1; diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4 index c7ec027954..4c5376d601 100644 --- a/src/core/load-fragment-gperf.gperf.m4 +++ b/src/core/load-fragment-gperf.gperf.m4 @@ -134,9 +134,7 @@ Unit.Description, config_parse_unit_string_printf, 0, Unit.Documentation, config_parse_documentation, 0, offsetof(Unit, documentation) Unit.SourcePath, config_parse_path, 0, offsetof(Unit, source_path) Unit.Requires, config_parse_unit_deps, UNIT_REQUIRES, 0 -Unit.RequiresOverridable, config_parse_unit_deps, UNIT_REQUIRES_OVERRIDABLE, 0 Unit.Requisite, config_parse_unit_deps, UNIT_REQUISITE, 0 -Unit.RequisiteOverridable, config_parse_unit_deps, UNIT_REQUISITE_OVERRIDABLE, 0 Unit.Wants, config_parse_unit_deps, UNIT_WANTS, 0 Unit.BindsTo, config_parse_unit_deps, UNIT_BINDS_TO, 0 Unit.BindTo, config_parse_unit_deps, UNIT_BINDS_TO, 0 @@ -150,6 +148,8 @@ Unit.ReloadPropagatedFrom, config_parse_unit_deps, UNIT_RELOAD Unit.PropagateReloadFrom, config_parse_unit_deps, UNIT_RELOAD_PROPAGATED_FROM, 0 Unit.PartOf, config_parse_unit_deps, UNIT_PART_OF, 0 Unit.JoinsNamespaceOf, config_parse_unit_deps, UNIT_JOINS_NAMESPACE_OF, 0 +Unit.RequiresOverridable, config_parse_obsolete_unit_deps, UNIT_REQUIRES, 0 +Unit.RequisiteOverridable, config_parse_obsolete_unit_deps, UNIT_REQUISITE, 0 Unit.RequiresMountsFor, config_parse_unit_requires_mounts_for, 0, 0 Unit.StopWhenUnneeded, config_parse_bool, 0, offsetof(Unit, stop_when_unneeded) Unit.RefuseManualStart, config_parse_bool, 0, offsetof(Unit, refuse_manual_start) diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 18cbbf0dcc..62cad0a0c0 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -98,16 +98,17 @@ int config_parse_warn_compat( return 0; } -int config_parse_unit_deps(const char *unit, - const char *filename, - unsigned line, - const char *section, - unsigned section_line, - const char *lvalue, - int ltype, - const char *rvalue, - void *data, - void *userdata) { +int config_parse_unit_deps( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { UnitDependency d = ltype; Unit *u = userdata; @@ -146,6 +147,24 @@ int config_parse_unit_deps(const char *unit, return 0; } +int config_parse_obsolete_unit_deps( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + + log_syntax(unit, LOG_WARNING, filename, line, 0, + "Unit dependency type %s= is obsolete, replacing by %s=, please update your unit file", lvalue, unit_dependency_to_string(ltype)); + + return config_parse_unit_deps(unit, filename, line, section, section_line, lvalue, ltype, rvalue, data, userdata); +} + int config_parse_unit_string_printf( const char *unit, const char *filename, diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h index eb4de1582f..62300c10f9 100644 --- a/src/core/load-fragment.h +++ b/src/core/load-fragment.h @@ -31,6 +31,7 @@ void unit_dump_config_items(FILE *f); int config_parse_warn_compat(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_deps(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +int config_parse_obsolete_unit_deps(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_string_printf(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_strv_printf(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); int config_parse_unit_path_printf(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); diff --git a/src/core/main.c b/src/core/main.c index a86080642d..33529c3e76 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1744,11 +1744,13 @@ int main(int argc, char *argv[]) { manager_dump_units(m, stdout, "\t"); } - r = manager_add_job(m, JOB_START, target, JOB_ISOLATE, false, &error, &default_unit_job); + r = manager_add_job(m, JOB_START, target, JOB_ISOLATE, &error, &default_unit_job); if (r == -EPERM) { log_debug("Default target could not be isolated, starting instead: %s", bus_error_message(&error, r)); - r = manager_add_job(m, JOB_START, target, JOB_REPLACE, false, &error, &default_unit_job); + sd_bus_error_free(&error); + + r = manager_add_job(m, JOB_START, target, JOB_REPLACE, &error, &default_unit_job); if (r < 0) { log_emergency("Failed to start default target: %s", bus_error_message(&error, r)); error_message = "Failed to start default target"; diff --git a/src/core/manager.c b/src/core/manager.c index 099bfe4268..f695b8a66c 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -1183,7 +1183,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { return r; } -int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool override, sd_bus_error *e, Job **_ret) { +int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, sd_bus_error *e, Job **_ret) { int r; Transaction *tr; @@ -1206,7 +1206,7 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove if (!tr) return -ENOMEM; - r = transaction_add_job_and_dependencies(tr, type, unit, NULL, true, override, false, + r = transaction_add_job_and_dependencies(tr, type, unit, NULL, true, false, mode == JOB_IGNORE_DEPENDENCIES || mode == JOB_IGNORE_REQUIREMENTS, mode == JOB_IGNORE_DEPENDENCIES, e); if (r < 0) @@ -1238,7 +1238,7 @@ tr_abort: return r; } -int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode mode, bool override, sd_bus_error *e, Job **_ret) { +int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode mode, sd_bus_error *e, Job **ret) { Unit *unit; int r; @@ -1251,7 +1251,23 @@ int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode if (r < 0) return r; - return manager_add_job(m, type, unit, mode, override, e, _ret); + return manager_add_job(m, type, unit, mode, e, ret); +} + +int manager_add_job_by_name_and_warn(Manager *m, JobType type, const char *name, JobMode mode, Job **ret) { + _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; + int r; + + assert(m); + assert(type < _JOB_TYPE_MAX); + assert(name); + assert(mode < _JOB_MODE_MAX); + + r = manager_add_job_by_name(m, type, name, mode, &error, ret); + if (r < 0) + return log_warning_errno(r, "Failed to enqueue %s job for %s: %s", job_mode_to_string(mode), name, bus_error_message(&error, r)); + + return r; } Job *manager_get_job(Manager *m, uint32_t id) { @@ -1687,7 +1703,7 @@ static int manager_start_target(Manager *m, const char *name, JobMode mode) { log_debug("Activating special unit %s", name); - r = manager_add_job_by_name(m, JOB_START, name, mode, true, &error, NULL); + r = manager_add_job_by_name(m, JOB_START, name, mode, &error, NULL); if (r < 0) log_error("Failed to enqueue %s job: %s", name, bus_error_message(&error, r)); diff --git a/src/core/manager.h b/src/core/manager.h index b1f8576761..bc3f02f872 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -326,8 +326,9 @@ int manager_load_unit_prepare(Manager *m, const char *name, const char *path, sd int manager_load_unit(Manager *m, const char *name, const char *path, sd_bus_error *e, Unit **_ret); int manager_load_unit_from_dbus_path(Manager *m, const char *s, sd_bus_error *e, Unit **_u); -int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool force, sd_bus_error *e, Job **_ret); -int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode mode, bool force, sd_bus_error *e, Job **_ret); +int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, sd_bus_error *e, Job **_ret); +int manager_add_job_by_name(Manager *m, JobType type, const char *name, JobMode mode, sd_bus_error *e, Job **_ret); +int manager_add_job_by_name_and_warn(Manager *m, JobType type, const char *name, JobMode mode, Job **ret); void manager_dump_units(Manager *s, FILE *f, const char *prefix); void manager_dump_jobs(Manager *s, FILE *f, const char *prefix); diff --git a/src/core/path.c b/src/core/path.c index c0992b4fcc..02fb134bb9 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -474,8 +474,7 @@ static void path_enter_running(Path *p) { if (unit_stop_pending(UNIT(p))) return; - r = manager_add_job(UNIT(p)->manager, JOB_START, UNIT_TRIGGER(UNIT(p)), - JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(p)->manager, JOB_START, UNIT_TRIGGER(UNIT(p)), JOB_REPLACE, &error, NULL); if (r < 0) goto fail; diff --git a/src/core/service.c b/src/core/service.c index 203b3ab273..c27b70fa3c 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1849,7 +1849,7 @@ static void service_enter_restart(Service *s) { * restarted. We use JOB_RESTART (instead of the more obvious * JOB_START) here so that those dependency jobs will be added * as well. */ - r = manager_add_job(UNIT(s)->manager, JOB_RESTART, UNIT(s), JOB_FAIL, false, &error, NULL); + r = manager_add_job(UNIT(s)->manager, JOB_RESTART, UNIT(s), JOB_FAIL, &error, NULL); if (r < 0) goto fail; diff --git a/src/core/socket.c b/src/core/socket.c index 43d4ec5dca..5b9e32ce9d 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1921,7 +1921,7 @@ static void socket_enter_running(Socket *s, int cfd) { goto fail; } - r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT_DEREF(s->service), JOB_REPLACE, &error, NULL); if (r < 0) goto fail; } @@ -1979,7 +1979,7 @@ static void socket_enter_running(Socket *s, int cfd) { cfd = -1; s->n_connections ++; - r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT(service), JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(s)->manager, JOB_START, UNIT(service), JOB_REPLACE, &error, NULL); if (r < 0) goto fail; diff --git a/src/core/target.c b/src/core/target.c index c3e79fffc8..14f9b2e26a 100644 --- a/src/core/target.c +++ b/src/core/target.c @@ -52,9 +52,7 @@ static int target_add_default_dependencies(Target *t) { static const UnitDependency deps[] = { UNIT_REQUIRES, - UNIT_REQUIRES_OVERRIDABLE, UNIT_REQUISITE, - UNIT_REQUISITE_OVERRIDABLE, UNIT_WANTS, UNIT_BINDS_TO, UNIT_PART_OF diff --git a/src/core/timer.c b/src/core/timer.c index 06a6035315..51b1d875be 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -511,8 +511,7 @@ static void timer_enter_running(Timer *t) { if (unit_stop_pending(UNIT(t))) return; - r = manager_add_job(UNIT(t)->manager, JOB_START, UNIT_TRIGGER(UNIT(t)), - JOB_REPLACE, true, &error, NULL); + r = manager_add_job(UNIT(t)->manager, JOB_START, UNIT_TRIGGER(UNIT(t)), JOB_REPLACE, &error, NULL); if (r < 0) goto fail; diff --git a/src/core/transaction.c b/src/core/transaction.c index 69f28c902f..cf37b5eb75 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -99,9 +99,7 @@ static void transaction_merge_and_delete_job(Transaction *tr, Job *j, Job *other j->type = t; j->state = JOB_WAITING; - j->override = j->override || other->override; j->irreversible = j->irreversible || other->irreversible; - j->matters_to_anchor = j->matters_to_anchor || other->matters_to_anchor; /* Patch us in as new owner of the JobDependency objects */ @@ -745,7 +743,7 @@ int transaction_activate(Transaction *tr, Manager *m, JobMode mode, sd_bus_error return 0; } -static Job* transaction_add_one_job(Transaction *tr, JobType type, Unit *unit, bool override, bool *is_new) { +static Job* transaction_add_one_job(Transaction *tr, JobType type, Unit *unit, bool *is_new) { Job *j, *f; assert(tr); @@ -774,7 +772,6 @@ static Job* transaction_add_one_job(Transaction *tr, JobType type, Unit *unit, b j->generation = 0; j->marker = NULL; j->matters_to_anchor = false; - j->override = override; j->irreversible = tr->irreversible; LIST_PREPEND(transaction, f, j); @@ -833,7 +830,6 @@ int transaction_add_job_and_dependencies( Unit *unit, Job *by, bool matters, - bool override, bool conflicts, bool ignore_requirements, bool ignore_order, @@ -895,7 +891,7 @@ int transaction_add_job_and_dependencies( /* First add the job. */ - ret = transaction_add_one_job(tr, type, unit, override, &is_new); + ret = transaction_add_one_job(tr, type, unit, &is_new); if (!ret) return -ENOMEM; @@ -918,7 +914,7 @@ int transaction_add_job_and_dependencies( * add all dependencies of everybody following. */ if (unit_following_set(ret->unit, &following) > 0) { SET_FOREACH(dep, following, i) { - r = transaction_add_job_and_dependencies(tr, type, dep, ret, false, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, type, dep, ret, false, false, false, ignore_order, e); if (r < 0) { log_unit_warning(dep, "Cannot add dependency job for, ignoring: %s", bus_error_message(e, r)); sd_bus_error_free(e); @@ -931,7 +927,7 @@ int transaction_add_job_and_dependencies( /* Finally, recursively add in all dependencies. */ if (type == JOB_START || type == JOB_RESTART) { SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUIRES], i) { - r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, false, false, ignore_order, e); if (r < 0) { if (r != -EBADR) goto fail; @@ -941,7 +937,7 @@ int transaction_add_job_and_dependencies( } SET_FOREACH(dep, ret->unit->dependencies[UNIT_BINDS_TO], i) { - r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, true, false, false, ignore_order, e); if (r < 0) { if (r != -EBADR) goto fail; @@ -950,19 +946,8 @@ int transaction_add_job_and_dependencies( } } - SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUIRES_OVERRIDABLE], i) { - r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, !override, override, false, false, ignore_order, e); - if (r < 0) { - log_unit_full(dep, - r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r, - "Cannot add dependency job, ignoring: %s", - bus_error_message(e, r)); - sd_bus_error_free(e); - } - } - SET_FOREACH(dep, ret->unit->dependencies[UNIT_WANTS], i) { - r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, false, false, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, false, false, false, ignore_order, e); if (r < 0) { log_unit_full(dep, r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r, @@ -973,7 +958,7 @@ int transaction_add_job_and_dependencies( } SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUISITE], i) { - r = transaction_add_job_and_dependencies(tr, JOB_VERIFY_ACTIVE, dep, ret, true, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_VERIFY_ACTIVE, dep, ret, true, false, false, ignore_order, e); if (r < 0) { if (r != -EBADR) goto fail; @@ -982,19 +967,8 @@ int transaction_add_job_and_dependencies( } } - SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUISITE_OVERRIDABLE], i) { - r = transaction_add_job_and_dependencies(tr, JOB_VERIFY_ACTIVE, dep, ret, !override, override, false, false, ignore_order, e); - if (r < 0) { - log_unit_full(dep, - r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING, r, - "Cannot add dependency job, ignoring: %s", - bus_error_message(e, r)); - sd_bus_error_free(e); - } - } - SET_FOREACH(dep, ret->unit->dependencies[UNIT_CONFLICTS], i) { - r = transaction_add_job_and_dependencies(tr, JOB_STOP, dep, ret, true, override, true, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_STOP, dep, ret, true, true, false, ignore_order, e); if (r < 0) { if (r != -EBADR) goto fail; @@ -1004,7 +978,7 @@ int transaction_add_job_and_dependencies( } SET_FOREACH(dep, ret->unit->dependencies[UNIT_CONFLICTED_BY], i) { - r = transaction_add_job_and_dependencies(tr, JOB_STOP, dep, ret, false, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_STOP, dep, ret, false, false, false, ignore_order, e); if (r < 0) { log_unit_warning(dep, "Cannot add dependency job, ignoring: %s", @@ -1039,7 +1013,7 @@ int transaction_add_job_and_dependencies( if (nt == JOB_NOP) continue; - r = transaction_add_job_and_dependencies(tr, nt, dep, ret, true, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, nt, dep, ret, true, false, false, ignore_order, e); if (r < 0) { if (r != -EBADR) goto fail; @@ -1052,7 +1026,7 @@ int transaction_add_job_and_dependencies( if (type == JOB_RELOAD) { SET_FOREACH(dep, ret->unit->dependencies[UNIT_PROPAGATES_RELOAD_TO], i) { - r = transaction_add_job_and_dependencies(tr, JOB_RELOAD, dep, ret, false, override, false, false, ignore_order, e); + r = transaction_add_job_and_dependencies(tr, JOB_RELOAD, dep, ret, false, false, false, ignore_order, e); if (r < 0) { log_unit_warning(dep, "Cannot add dependency reload job, ignoring: %s", @@ -1097,7 +1071,7 @@ int transaction_add_isolate_jobs(Transaction *tr, Manager *m) { if (hashmap_get(tr->jobs, u)) continue; - r = transaction_add_job_and_dependencies(tr, JOB_STOP, u, tr->anchor_job, true, false, false, false, false, NULL); + r = transaction_add_job_and_dependencies(tr, JOB_STOP, u, tr->anchor_job, true, false, false, false, NULL); if (r < 0) log_unit_warning_errno(u, r, "Cannot add isolate job, ignoring: %m"); } diff --git a/src/core/transaction.h b/src/core/transaction.h index d949b21b8d..f7aa3df085 100644 --- a/src/core/transaction.h +++ b/src/core/transaction.h @@ -44,7 +44,6 @@ int transaction_add_job_and_dependencies( Unit *unit, Job *by, bool matters, - bool override, bool conflicts, bool ignore_requirements, bool ignore_order, diff --git a/src/core/unit.c b/src/core/unit.c index a67b9f282f..f553f24829 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1101,9 +1101,7 @@ static int unit_add_target_dependencies(Unit *u) { static const UnitDependency deps[] = { UNIT_REQUIRED_BY, - UNIT_REQUIRED_BY_OVERRIDABLE, UNIT_REQUISITE_OF, - UNIT_REQUISITE_OF_OVERRIDABLE, UNIT_WANTED_BY, UNIT_BOUND_BY }; @@ -1605,11 +1603,11 @@ bool unit_can_reload(Unit *u) { static void unit_check_unneeded(Unit *u) { + _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; + static const UnitDependency needed_dependencies[] = { UNIT_REQUIRED_BY, - UNIT_REQUIRED_BY_OVERRIDABLE, UNIT_REQUISITE_OF, - UNIT_REQUISITE_OF_OVERRIDABLE, UNIT_WANTED_BY, UNIT_BOUND_BY, }; @@ -1646,12 +1644,13 @@ static void unit_check_unneeded(Unit *u) { log_unit_info(u, "Unit not needed anymore. Stopping."); /* Ok, nobody needs us anymore. Sniff. Then let's commit suicide */ - r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL); + r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, &error, NULL); if (r < 0) - log_unit_warning_errno(u, r, "Failed to enqueue stop job, ignoring: %m"); + log_unit_warning_errno(u, r, "Failed to enqueue stop job, ignoring: %s", bus_error_message(&error, r)); } static void unit_check_binds_to(Unit *u) { + _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; bool stop = false; Unit *other; Iterator i; @@ -1691,9 +1690,9 @@ static void unit_check_binds_to(Unit *u) { log_unit_info(u, "Unit is bound to inactive unit %s. Stopping, too.", other->id); /* A unit we need to run is gone. Sniff. Let's stop this. */ - r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL); + r = manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, &error, NULL); if (r < 0) - log_unit_warning_errno(u, r, "Failed to enqueue stop job, ignoring: %m"); + log_unit_warning_errno(u, r, "Failed to enqueue stop job, ignoring: %s", bus_error_message(&error, r)); } static void retroactively_start_dependencies(Unit *u) { @@ -1706,30 +1705,25 @@ static void retroactively_start_dependencies(Unit *u) { SET_FOREACH(other, u->dependencies[UNIT_REQUIRES], i) if (!set_get(u->dependencies[UNIT_AFTER], other) && !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL); + manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, NULL, NULL); SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i) if (!set_get(u->dependencies[UNIT_AFTER], other) && !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, true, NULL, NULL); - - SET_FOREACH(other, u->dependencies[UNIT_REQUIRES_OVERRIDABLE], i) - if (!set_get(u->dependencies[UNIT_AFTER], other) && - !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_START, other, JOB_FAIL, false, NULL, NULL); + manager_add_job(u->manager, JOB_START, other, JOB_REPLACE, NULL, NULL); SET_FOREACH(other, u->dependencies[UNIT_WANTS], i) if (!set_get(u->dependencies[UNIT_AFTER], other) && !UNIT_IS_ACTIVE_OR_ACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_START, other, JOB_FAIL, false, NULL, NULL); + manager_add_job(u->manager, JOB_START, other, JOB_FAIL, NULL, NULL); SET_FOREACH(other, u->dependencies[UNIT_CONFLICTS], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_STOP, other, JOB_REPLACE, true, NULL, NULL); + manager_add_job(u->manager, JOB_STOP, other, JOB_REPLACE, NULL, NULL); SET_FOREACH(other, u->dependencies[UNIT_CONFLICTED_BY], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_STOP, other, JOB_REPLACE, true, NULL, NULL); + manager_add_job(u->manager, JOB_STOP, other, JOB_REPLACE, NULL, NULL); } static void retroactively_stop_dependencies(Unit *u) { @@ -1742,7 +1736,7 @@ static void retroactively_stop_dependencies(Unit *u) { /* Pull down units which are bound to us recursively if enabled */ SET_FOREACH(other, u->dependencies[UNIT_BOUND_BY], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) - manager_add_job(u->manager, JOB_STOP, other, JOB_REPLACE, true, NULL, NULL); + manager_add_job(u->manager, JOB_STOP, other, JOB_REPLACE, NULL, NULL); } static void check_unneeded_dependencies(Unit *u) { @@ -1756,18 +1750,12 @@ static void check_unneeded_dependencies(Unit *u) { SET_FOREACH(other, u->dependencies[UNIT_REQUIRES], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) unit_check_unneeded(other); - SET_FOREACH(other, u->dependencies[UNIT_REQUIRES_OVERRIDABLE], i) - if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) - unit_check_unneeded(other); SET_FOREACH(other, u->dependencies[UNIT_WANTS], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) unit_check_unneeded(other); SET_FOREACH(other, u->dependencies[UNIT_REQUISITE], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) unit_check_unneeded(other); - SET_FOREACH(other, u->dependencies[UNIT_REQUISITE_OVERRIDABLE], i) - if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) - unit_check_unneeded(other); SET_FOREACH(other, u->dependencies[UNIT_BINDS_TO], i) if (!UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(other))) unit_check_unneeded(other); @@ -1787,7 +1775,7 @@ void unit_start_on_failure(Unit *u) { SET_FOREACH(other, u->dependencies[UNIT_ON_FAILURE], i) { int r; - r = manager_add_job(u->manager, JOB_START, other, u->on_failure_job_mode, true, NULL, NULL); + r = manager_add_job(u->manager, JOB_START, other, u->on_failure_job_mode, NULL, NULL); if (r < 0) log_unit_error_errno(u, r, "Failed to enqueue OnFailure= job: %m"); } @@ -2135,16 +2123,12 @@ int unit_add_dependency(Unit *u, UnitDependency d, Unit *other, bool add_referen static const UnitDependency inverse_table[_UNIT_DEPENDENCY_MAX] = { [UNIT_REQUIRES] = UNIT_REQUIRED_BY, - [UNIT_REQUIRES_OVERRIDABLE] = UNIT_REQUIRED_BY_OVERRIDABLE, [UNIT_WANTS] = UNIT_WANTED_BY, [UNIT_REQUISITE] = UNIT_REQUISITE_OF, - [UNIT_REQUISITE_OVERRIDABLE] = UNIT_REQUISITE_OF_OVERRIDABLE, [UNIT_BINDS_TO] = UNIT_BOUND_BY, [UNIT_PART_OF] = UNIT_CONSISTS_OF, [UNIT_REQUIRED_BY] = UNIT_REQUIRES, - [UNIT_REQUIRED_BY_OVERRIDABLE] = UNIT_REQUIRES_OVERRIDABLE, [UNIT_REQUISITE_OF] = UNIT_REQUISITE, - [UNIT_REQUISITE_OF_OVERRIDABLE] = UNIT_REQUISITE_OVERRIDABLE, [UNIT_WANTED_BY] = UNIT_WANTS, [UNIT_BOUND_BY] = UNIT_BINDS_TO, [UNIT_CONSISTS_OF] = UNIT_PART_OF, diff --git a/src/shared/generator.c b/src/shared/generator.c index cb4ebc606e..9998c64416 100644 --- a/src/shared/generator.c +++ b/src/shared/generator.c @@ -64,7 +64,7 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) { "Description=File System Check on %2$s\n" "DefaultDependencies=no\n" "BindsTo=%3$s\n" - "After=%3$s\n" + "After=%3$s local-fs-pre.target\n" "Before=shutdown.target\n" "\n" "[Service]\n" @@ -142,7 +142,7 @@ int generator_write_fsck_deps( } fprintf(f, - "RequiresOverridable=%1$s\n" + "Requires=%1$s\n" "After=%1$s\n", fsck); } diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index be98bc9671..51b82d57db 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -1503,16 +1503,12 @@ static int list_dependencies_get_dependencies(sd_bus *bus, const char *name, cha static const char *dependencies[_DEPENDENCY_MAX] = { [DEPENDENCY_FORWARD] = "Requires\0" - "RequiresOverridable\0" "Requisite\0" - "RequisiteOverridable\0" "Wants\0" "ConsistsOf\0" "BindsTo\0", [DEPENDENCY_REVERSE] = "RequiredBy\0" - "RequiredByOverridable\0" "RequisiteOf\0" - "RequisiteOfOverridable\0" "WantedBy\0" "PartOf\0" "BoundBy\0", diff --git a/src/test/test-engine.c b/src/test/test-engine.c index 6596069ade..954ed0d9e0 100644 --- a/src/test/test-engine.c +++ b/src/test/test-engine.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) { manager_dump_units(m, stdout, "\t"); printf("Test1: (Trivial)\n"); - r = manager_add_job(m, JOB_START, c, JOB_REPLACE, false, &err, &j); + r = manager_add_job(m, JOB_START, c, JOB_REPLACE, &err, &j); if (sd_bus_error_is_set(&err)) log_error("error: %s: %s", err.name, err.message); assert_se(r == 0); @@ -65,15 +65,15 @@ int main(int argc, char *argv[]) { manager_dump_units(m, stdout, "\t"); printf("Test2: (Cyclic Order, Unfixable)\n"); - assert_se(manager_add_job(m, JOB_START, d, JOB_REPLACE, false, NULL, &j) == -EDEADLK); + assert_se(manager_add_job(m, JOB_START, d, JOB_REPLACE, NULL, &j) == -EDEADLK); manager_dump_jobs(m, stdout, "\t"); printf("Test3: (Cyclic Order, Fixable, Garbage Collector)\n"); - assert_se(manager_add_job(m, JOB_START, e, JOB_REPLACE, false, NULL, &j) == 0); + assert_se(manager_add_job(m, JOB_START, e, JOB_REPLACE, NULL, &j) == 0); manager_dump_jobs(m, stdout, "\t"); printf("Test4: (Identical transaction)\n"); - assert_se(manager_add_job(m, JOB_START, e, JOB_FAIL, false, NULL, &j) == 0); + assert_se(manager_add_job(m, JOB_START, e, JOB_FAIL, NULL, &j) == 0); manager_dump_jobs(m, stdout, "\t"); printf("Load3:\n"); @@ -81,21 +81,21 @@ int main(int argc, char *argv[]) { manager_dump_units(m, stdout, "\t"); printf("Test5: (Colliding transaction, fail)\n"); - assert_se(manager_add_job(m, JOB_START, g, JOB_FAIL, false, NULL, &j) == -EDEADLK); + assert_se(manager_add_job(m, JOB_START, g, JOB_FAIL, NULL, &j) == -EDEADLK); printf("Test6: (Colliding transaction, replace)\n"); - assert_se(manager_add_job(m, JOB_START, g, JOB_REPLACE, false, NULL, &j) == 0); + assert_se(manager_add_job(m, JOB_START, g, JOB_REPLACE, NULL, &j) == 0); manager_dump_jobs(m, stdout, "\t"); printf("Test7: (Unmergeable job type, fail)\n"); - assert_se(manager_add_job(m, JOB_STOP, g, JOB_FAIL, false, NULL, &j) == -EDEADLK); + assert_se(manager_add_job(m, JOB_STOP, g, JOB_FAIL, NULL, &j) == -EDEADLK); printf("Test8: (Mergeable job type, fail)\n"); - assert_se(manager_add_job(m, JOB_RESTART, g, JOB_FAIL, false, NULL, &j) == 0); + assert_se(manager_add_job(m, JOB_RESTART, g, JOB_FAIL, NULL, &j) == 0); manager_dump_jobs(m, stdout, "\t"); printf("Test9: (Unmergeable job type, replace)\n"); - assert_se(manager_add_job(m, JOB_STOP, g, JOB_REPLACE, false, NULL, &j) == 0); + assert_se(manager_add_job(m, JOB_STOP, g, JOB_REPLACE, NULL, &j) == 0); manager_dump_jobs(m, stdout, "\t"); printf("Load4:\n"); @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) { manager_dump_units(m, stdout, "\t"); printf("Test10: (Unmergeable job type of auxiliary job, fail)\n"); - assert_se(manager_add_job(m, JOB_START, h, JOB_FAIL, false, NULL, &j) == 0); + assert_se(manager_add_job(m, JOB_START, h, JOB_FAIL, NULL, &j) == 0); manager_dump_jobs(m, stdout, "\t"); manager_free(m); |