Commit graph

514 commits

Author SHA1 Message Date
Kay Sievers 93f04c80f6 units: initrd, multi-user - add a few more words to Description= 2013-03-16 16:29:29 +01:00
Umut Tezduyar faeffa73a8 units: ignore systemd-sysctl on shutdown
No need to try to stop systemd-sysctl on shutdown as
this service doesn't have ExecStop= anyways.
2013-03-15 22:56:33 -04:00
Harald Hoyer 9e5f0f9291 Make initrd.target the default target in the initrd
First, rename root-fs.target to initrd-root-fs.target to clarify its usage.

Mount units with "x-initrd-rootfs.mount" are now ordered before
initrd-root-fs.target. As we sometimes construct /sysroot mounts in
/etc/fstab in the initrd, we want these to be mounted before the
initrd-root-fs.target is active.

initrd.target can be the default target in the initrd.

                             (normal startup)
                                    :
                                    :
                                    v
                              basic.target
                                    |
             ______________________/|
            /                       |
            |                  sysroot.mount
            |                       |
            |                       v
            |             initrd-root-fs.target
            |                       |
            |                       v
            |            initrd-parse-etc.service
(custom initrd services)            |
            |                       v
            |            (sysroot-usr.mount and
            |             various mounts marked
            |               with fstab option
            |                x-initrd.mount)
            |                       |
            |                       v
            |                initrd-fs.target
            |                       |
            \______________________ |
                                   \|
                                    v
                               initrd.target
                                    |
                                    v
                          initrd-cleanup.service
                               isolates to
                         initrd-switch-root.target
                                    |
                                    v
             ______________________/|
            /                       |
            |        initrd-udevadm-cleanup-db.service
            |                       |
(custom initrd services)            |
            |                       |
            \______________________ |
                                   \|
                                    v
                        initrd-switch-root.target
                                    |
                                    v
                        initrd-switch-root.service
                                    |
                                    v
                               switch-root
2013-03-15 00:49:37 +01:00
Harald Hoyer 700e07ffd5 add initrd-fs.target and root-fs.target
Instead of using local-fs*.target in the initrd, use root-fs.target for
sysroot.mount and initrd-fs.target for /sysroot/usr and friends.

Using local-fs.target would mean to carry over the activated
local-fs.target to the isolated initrd-switch-root.target and thus in
the real root. Having local-fs.target already active after
deserialization causes ordering problems with the real root services and
targets.

We better isolate to targets for initrd-switch-root.target, which are
only available in the initrd.
2013-03-13 08:11:17 +01:00
Harald Hoyer 6bde0b3220 remote-fs.target: want remote-fs-pre.target
This pulls in remote-fs-pre.target if remote-fs.target is needed.

Previously remote-fs-pre.target was not active, if no remote fs was
mounted from /etc/fstab. So, every manual remote fs mount was ordered
against the inactive remote-fs-pre.target and umount.target.

Because remote-fs-pre.target was not active, the remote fs was umounted
at umount.target time, which was too late (network already down).

Now remote-fs-pre.target is active, even if no remote fs is mounted.
On shutdown it is deactivated in the correct order and all manual remote
fs mounts also.
2013-03-12 18:24:44 +01:00
Kay Sievers 3bf3cd95ab udevd: sort into sysinit instead of basic target 2013-03-12 15:56:19 +01:00
Michael Biebl b39ad46de4 Update .gitignore
for the changes in 7b40ce553f
2013-03-11 17:08:03 +01:00
Michael Biebl f432bb9144 Move udevadm to rootbindir
The udevadm utility is needed during early boot, so move it to
rootbindir to support split-/usr configurations.
2013-03-11 07:18:33 +01:00
Michael Biebl 7b40ce553f build-sys: don't hard-code binary paths in initrd-*.service
Instead use @bindir@ for udevadm and @rootbindir@ for systemctl.
2013-03-09 10:05:01 +01:00
Harald Hoyer da61d6b2f2 units: run systemd-ask-password-console.service after systemd-vconsole-setup.service 2013-03-06 15:39:37 +01:00
Harald Hoyer 248ea600d0 initrd-parse-etc.servic: force start local-fs.target 2013-03-06 11:03:39 +01:00
Harald Hoyer 7fdf51751c Revert "add initrd-fs.target and initrd-fs-pre.target"
This reverts commit 39b83cdab3.
2013-03-06 11:03:39 +01:00
Harald Hoyer fdf1848d1d Revert "units/initrd-*: require initrd-fs.target rather than local-fs.target"
This reverts commit 7d89ce303f.
2013-03-06 11:03:39 +01:00
Lennart Poettering 37495eede9 journal: make gatewayd run under its own user ID 2013-03-05 19:15:31 +01:00
Harald Hoyer 7d89ce303f units/initrd-*: require initrd-fs.target rather than local-fs.target 2013-03-04 19:33:50 +01:00
Harald Hoyer 39b83cdab3 add initrd-fs.target and initrd-fs-pre.target 2013-03-04 19:33:50 +01:00
Tom Gundersen cf84347794 initrd: add unit files needed for basic systemd-in-initrd support
This will:
 * mount all configured filesystems (typically the rootfs on /sysroot)
 * reload the configuration to pick up anything from the mounted fs (typically
   /sysroot/etc/fstab)
 * mount any newly configured filesystems (typically /usr on /sysroot/usr, if
   applicable)
 * shut-down and clean-up any daemons running in the initramfs (typically udevd)
 * switch-root to /sysroot and start the real init

For an example of what files should be included in an initramfs based on this
see
<https://mailman.archlinux.org/pipermail/arch-projects/2013-February/003628.html>.

Cc: Harald Hoyer <harald.hoyer@gmail.com>
Cc: Dave Reisner <d@falconindy.com>
2013-03-01 22:52:36 +01:00
Zbigniew Jędrzejewski-Szmek 652e737517 build-sys: keep intermediate files
Sometimes it is useful to look at them, and they don't take
up any significant amount of space. Keeping them also avoids
the message about files being removed at the end of make
run.
2013-01-29 21:17:40 -05:00
Lennart Poettering 5d4caf5654 service: ignore dependencies on $syslog and $local_fs in LSB scripts
We no longer allow early-boot init scripts, however in late boot the
syslog socket and local mounts are established anyway, so let's simplify
our dep graph a bit.

If $syslog doesn't resolve to syslog.target anymore there's no reason to
keep syslog.target around anymore. Let's remove it.

Note that many 3rd party service unit files order themselves after
syslog.target. These will be dangling dependencies now, which should be
unproblematic, however.
2013-01-16 21:34:09 +01:00
Kay Sievers 3f141375cb service: sysv - remove distribution specific targets
Systemd should not introduce any new facilities. Distributions which still
need to support their non-standard/legacy facilities should add them as
patches to their packaging.

The following facilities are no longer recognized:
  $x-display-manager
  $mail-transfer-agent
  $mail-transport-agent
  $mail-transfer-agent
  $smtp
  $null

This target is no longer available:
  mail-transfer-agent.target
2013-01-16 04:26:49 +01:00
Lennart Poettering 25ed795892 units: add reference to new wiki page to all api mount units 2013-01-15 18:14:13 +01:00
Lennart Poettering 236bc7573a man: link in API FS documentation from the wiki 2013-01-15 05:13:54 +01:00
Lennart Poettering aa6c53bf05 man: link in wiki documentation about network.target 2013-01-15 04:12:53 +01:00
Lennart Poettering 7f0086f8c9 units: always use sulogin in rescue.service
sushell makes much less sense than sulogin. If distros want to stick to sushell
they should patch this downstream.
2013-01-04 23:26:21 +01:00
Lennart Poettering 83514a2fa0 units: drop distro specific stuff from units
Since rc-local is now enabled via the SysV compatibility we should only refer
to it based on that too.
2013-01-04 23:26:21 +01:00
Lennart Poettering b1c4ca25bf build-sys: make rc-local support part of SYSV compat
This also drops automatic selection of the rc local scripts
based on the local distro. Distributions now should specify the paths
of the rc-local and halt-local scripts on the configure command line.
2013-01-04 23:26:20 +01:00
Lennart Poettering 22ffd25ba5 units: add CAP_DAC_OVERRIDE+CAP_SYS_PTRACE to hostnamed so that detection of virtualization works 2012-12-31 21:24:26 +01:00
Tollef Fog Heen 7a14d67f76 Remove frugalware display-manager.service
Frugalware are shipping their own .service file now, so stop shipping
it here.

This effectively reverts 196e3fa74a
2012-12-14 09:17:14 +01:00
Lennart Poettering 00addadd86 unit: link up getty configuration from man page and unit files 2012-11-20 20:10:30 +01:00
Lennart Poettering 95ec8647c7 journal: recommend journalctl -x more often 2012-11-16 03:03:54 +01:00
Lennart Poettering 669b04a492 service: drop special HTTP server target, as it is a bad idea anf Fedora specific
This was premarily intended to support the LSB facility $httpd which is
only known by Fedora, and a bad idea since it lacks any real-life
usecase.

Similar, drop support for some other old Fedora-specific facilities.

Also, document the rules for introduction of new facilities, to clarify
the situation for the future.
2012-10-31 02:55:04 +01:00
Michal Schmidt 2161de72c5 units: agetty overrides TERM
Environment=TERM=... has no effect on agetty who sets it by itself. To
really set TERM to a specified value, it has to be given on the command
line.

https://bugzilla.redhat.com/show_bug.cgi?id=870622
2012-10-29 22:58:40 +01:00
Ramkumar Ramachandra 9c2cd81e0e units: teach m4 scripts in units/ about Debian's rc.local
This makes the behaviour wrt. to rc[-.]local consistent between
various distributions supporting it.
2012-10-28 02:14:41 +02:00
Zbigniew Jędrzejewski-Szmek aa6eba407b units: reword rescue mode hints
Do not suggest to the user that commands can be issued before
logging in.

sulogin prints it own message, which mentions ^D, so there's no need
to repeat it here.
2012-10-28 02:14:00 +02:00
Lennart Poettering 6524990fdc logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
Tom Gundersen d0114527f4 units: don't order tmp.monut after local-fs-pre.target
Since tmp.mount is a tmpfs this is not necesary, and should speed up boot marginally.
2012-10-23 22:33:00 +02:00
Lennart Poettering 5411ae4782 units: use numerig signal for killing systemd, to avoid incompatibilities with procps/util-linux kill 2012-10-23 00:12:33 +02:00
Lennart Poettering 4474d8abd0 units: also add journalctl suggestion to emergency.service
More often than not we enter emergency.service due to fsck failure, so
it makes sense to direct people to the journal to debug those.
2012-10-23 00:12:33 +02:00
Lennart Poettering 74dc2b17e6 units: suggest journalctl -b in rescue.service so that only messages from the current boot are shown 2012-10-23 00:12:33 +02:00
Lennart Poettering 86b2e20a5e units: rework systemd-exit.service to terminate systemd via signal rather than bus
This should make session termination more reliable, as D-Bus doesn't
have to be around anymore for this to succeed.
2012-10-18 01:20:06 +02:00
Lennart Poettering 7b17a7d72f journal: add minimal journal gateway daemon based on GNU libmicrohttpd
This minimal HTTP server can serve journal data via HTTP. Its primary
purpose is synchronization of journal data across the network. It serves
journal data in three formats:

       text/plain: the text format known from /var/log/messages
       application/json: the journal entries formatted as JSON
       application/vnd.fdo.journal: the binary export format of the journal

The HTTP server also serves a small HTML5 app that makes use of the JSON
serialization to present the journal data to the user.

Examples:

This downloads the journal in text format:

 # systemctl start systemd-journal-gatewayd.service
 # wget http://localhost:19531/entries

Same for JSON:

 # curl -H"Accept: application/json" http://localhost:19531/entries

Access via web browser:

 $ firefox http://localhost:19531/
2012-09-28 00:55:24 +02:00
Tom Gundersen 44b1222bd3 udev: don't let systemd-udev-settle delay basic.target
It is no longer possible to manually enable systemd-udev-settle.service,
so its only use is by legacy services explicitly pulling it in. It makes
sense for these services to also explicitly order themselves after
udev-settle.service, which makes After=basic.target redundant.

This should reduce the negative effect on boot-time of having to enable
legacy services such as lvm.service.
2012-09-27 16:53:45 +02:00
Kay Sievers 84c3f7c2bb udev: remove Install section from systemd-udev-settle.service
Legacy tool on-demand pull-in the settling, it should never run
by default, nothing orders against is anyway.
2012-09-27 15:16:03 +02:00
Shawn Landden 608da9e9b5 man: remove timezone(5) and add localtime(5) 2012-09-14 19:27:59 +02:00
Dave Reisner b51fc639f0 build-sys: perform autodetection of quota-tools binaries
Use AC_PATH_PROG to try and locate the quotaon and quotacheck binaries,
falling back on hardcoded defaults when they can't be found.
2012-09-11 01:43:48 +02:00
Lennart Poettering ddffe89246 journal: don't pull in flush service from journald service
In the initrd we don't need the flush service hence don't attempt to
pull it in.
2012-09-03 18:59:05 -07:00
Lennart Poettering 7e75c5ac2d unit: make sure structured logging is available before we enter the main boot phase 2012-09-03 18:59:05 -07:00
Lennart Poettering b2c9cbafb8 units: remove prefdm
It's time to get rid of prefdm. Distributions which still want to use
this should maintain this downstream, but it's probably better to just
provide proper units for the various display managers, like Fedora is
doing this, for example:

https://fedoraproject.org/wiki/Features/DisplayManagerRework
2012-08-07 17:08:31 +02:00
Michal Schmidt 22cfbae09d units: add the modules-load cmdline parameters to the unit conditions
For 'modules-load=' and 'rd.modules-load=' to be effective,
systemd-modules-load.service must be started. It is currently
conditional on the existence of config files. Add the presence of the
cmdline parameters to the triggering conditions.
2012-07-25 08:51:41 +02:00
Lennart Poettering 3f612b9123 units: fix section of man page link in systemd-logind.service
https://bugs.freedesktop.org/show_bug.cgi?id=51963
2012-07-19 12:46:55 +02:00