1. 16 Nov, 2012 2 commits
    • Lennart Poettering's avatar
      service: drop support for SysV scripts for the early boot · 3cdebc21
      Lennart Poettering authored
      This remove distro-specific support for early-boot SysV init scripts.
      (And leaves support for normal SysV scripts untouched).
      
      If distributions wish to continue to allow early-boot SysV scripts in
      their distribution-specific way they should either maintain this patch
      downstream manually, or write a generator for them, or simply ship all
      those scripts with a .service wrapper.
      3cdebc21
    • Lennart Poettering's avatar
      shutdown: readd explicit sync() when shutting down · 0049f05a
      Lennart Poettering authored
      As it turns out reboot() doesn't actually imply a file system sync, but
      only a disk sync. Accordingly, readd explicit sync() invocations
      immediately before we invoke reboot().
      
      This is much less dramatic than it might sounds as we umount all
      disks/read-only remount them anyway before going down.
      0049f05a
  2. 31 Oct, 2012 1 commit
  3. 18 Oct, 2012 1 commit
  4. 17 Oct, 2012 1 commit
  5. 16 Oct, 2012 1 commit
  6. 15 Oct, 2012 1 commit
    • Mantas Mikulėnas's avatar
      core: allow Type=oneshot services to have ExecReload · 2abba39d
      Mantas Mikulėnas authored
      Use cases:
      
       * iptables.service – atomically reload rules without having to flush
         them beforehand (which may leave the system insecure if reload fails)
      
       * rpc-nfsd.service – reexport filesystems after /etc/exports update
         without completely stopping and restarting nfsd
      
      (In both cases, the actual service is provided by a kernel module and
      does not have any associated user-space processes, thus Type=oneshot.)
      2abba39d
  7. 21 Sep, 2012 1 commit
  8. 18 Sep, 2012 3 commits
  9. 17 Sep, 2012 2 commits
  10. 22 Aug, 2012 1 commit
  11. 14 Aug, 2012 1 commit
    • Lukas Nykryn's avatar
      service: add options RestartPreventExitStatus and SuccessExitStatus · 96342de6
      Lukas Nykryn authored
      In some cases, like wrong configuration, restarting after error
      does not help, so administrator can specify statuses by RestartPreventExitStatus
      which will not cause restart of a service.
      
      Sometimes you have non-standart exit status, so this can be specified
      by SuccessfulExitStatus.
      96342de6
  12. 08 Aug, 2012 1 commit
  13. 22 Jul, 2012 1 commit
  14. 19 Jul, 2012 3 commits
  15. 18 Jul, 2012 2 commits
  16. 16 Jul, 2012 1 commit
  17. 13 Jul, 2012 2 commits
  18. 10 Jul, 2012 1 commit
  19. 03 Jul, 2012 1 commit
  20. 26 Jun, 2012 2 commits
    • Michal Schmidt's avatar
      service: pass via FAILED/DEAD before going to AUTO_RESTART · 0c7f15b3
      Michal Schmidt authored
      With misconfigured mysql, which uses Restart=always, the following two
      messages would loop indefinitely and the "systemctl start" would never
      finish:
        Job pending for unit, delaying automatic restart.
        mysqld.service holdoff time over, scheduling restart.
      
      In service_enter_dead() always set the state to SERVICE_FAILED/DEAD first
      before setting SERVICE_AUTO_RESTART. This is to allow running jobs to
      complete. OnFailure will be also triggered at this point, so there's no
      need to do it again from service_stop() (where it was added in commit
      f0c7b229).
      
      Note that OnFailure units should better trigger only after giving up
      auto-restarting, but that's for another patch to solve.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=832039
      0c7f15b3
    • Michal Schmidt's avatar
      service: fix incorrect argument · e201a038
      Michal Schmidt authored
      The last argument to service_enter_dead() is bool allow_restart, not
      a service result.
      e201a038
  21. 22 Jun, 2012 1 commit
    • Lennart Poettering's avatar
      core: remove sysv_console option · d081dffb
      Lennart Poettering authored
      This option never made much sense. It was originally intended to make
      sure that the usual startup output of sysv scripts goes to the terminal.
      However, since SysV scripts started from a terminal would not output to
      that terminal, but rather /dev/console this effect was more often than
      not actually taking place. Nowadays systemd has much nicer boot time
      status output than SysV which makes the sysv output redundant. Finally,
      all output of services goes to the journal anyway, and is not lost.
      
      Hence, let's drop this option, and simplify things a bit.
      d081dffb
  22. 21 Jun, 2012 1 commit
    • Eelco Dolstra's avatar
      journal: set the _SYSTEMD_UNIT field for messages from terminated processes · 62bca2c6
      Eelco Dolstra authored
      As described in
      
        https://bugs.freedesktop.org/show_bug.cgi?id=50184
      
      the journal currently doesn't set fields such as _SYSTEMD_UNIT
      properly for messages coming from processes that have already
      terminated.  This means among other things that "systemctl status" may
      not show some of the output of services that wrote messages just
      before they exited.
      
      This patch fixes this by having processes that log to the journal
      write their unit identifier to journald when the connection to
      /run/systemd/journal/stdout is opened.  Journald stores the unit ID
      and uses it to fill in _SYSTEMD_UNIT when it cannot be obtained
      normally (i.e. from the cgroup).  To prevent impersonating another
      unit, this information is only used when the caller is root.
      
      This doesn't fix the general problem of getting metadata about
      messages from terminated processes (which requires some kernel
      support), but it allows "systemctl status" and similar queries to do
      the Right Thing for units that log via stdout/stderr.
      62bca2c6
  23. 15 Jun, 2012 1 commit
  24. 24 May, 2012 1 commit
    • Lennart Poettering's avatar
      service: for Type=idle units consider START_PRE, START, START_POST all as ACTIVE · e056b01d
      Lennart Poettering authored
      We want to avoid a deadlock when a service has ExecStartPre= programs
      that wait for the job queue to run empty because of Type=idle, but which
      themselves keep the queue non-empty because START_PRE was considered
      ACTIVATING and hence the job not complete. With this patch we alter the
      state translation table so that it is impossible ever to wait for
      Type=idle unit, hence removing the deadlock.
      e056b01d
  25. 22 May, 2012 1 commit
  26. 21 May, 2012 4 commits
  27. 14 May, 2012 1 commit
    • Michal Schmidt's avatar
      unit: unit type dependent status messages · c6918296
      Michal Schmidt authored
      Instead of generic "Starting..." and "Started" messages for all unit use
      type-dependent messages. For example, mounts will announce "Mounting..."
      and "Mounted".
      
      Add status messages to units of types that used to be entirely silent
      (automounts, sockets, targets, devices). For unit types whose jobs are
      instantaneous, report only the job completion, not the starting event.
      Socket units with non-instantaneous jobs are rare (Exec*= is not used
      often in socket units), so I chose not to print the starting messages
      for them either.
      
      This will hopefully give people better understanding of the boot.
      c6918296
  28. 08 May, 2012 1 commit