Commit Graph

215 Commits

Author SHA1 Message Date
Lennart Poettering
d76702a7b2 systemctl: if we managed to reexec the init system via the bus don't retry via signal
If we managed to reeexec the init system via the bus this allows us to
provide synchronous behaviour to callers. This is all lost if we then
repeat the reexecution via SIGTERM.

https://bugzilla.redhat.com/show_bug.cgi?id=698198
2011-08-31 03:31:32 +02:00
Frederic Crozat
65457142f1 initctl: check for kexec_loaded when reboot is requested through initctl 2011-08-24 02:19:30 +02:00
Lennart Poettering
d8bbda9141 cgroup: expose cgroup attributes as unit properties on the bus 2011-08-21 20:07:08 +02:00
Lennart Poettering
f786e80d7a systemctl: fix parsing of LoadError property for systemctl show 2011-07-31 18:28:33 +02:00
Lennart Poettering
a43757462a dbus: export unit file state 2011-07-31 18:28:02 +02:00
Lennart Poettering
9f39404c86 dbus: export load error on unit objects 2011-07-31 18:13:03 +02:00
Lennart Poettering
ecdcbc5e60 systemctl: s/ignore/ignore_error/ in 'show' output 2011-07-30 16:42:05 +02:00
Lennart Poettering
729e3769c3 systemctl: hook up new install logic
This adds a number of new options to systemctl, for presets, reenabling,
masking/unmask, and runtime operations.
2011-07-25 04:58:02 +02:00
Lennart Poettering
e1ea662c33 systemctl: remove monitor command since it is mostly useless 2011-07-23 04:21:47 +02:00
Lennart Poettering
34c4b47b7f systemctl: split --help into multiple sections 2011-07-23 04:20:22 +02:00
Lennart Poettering
09adcdf71d systemctl: fix indenting 2011-07-22 04:31:21 +02:00
Lennart Poettering
c800e48374 path-lookup: make inclusion of user private units optional 2011-07-22 04:31:20 +02:00
Lennart Poettering
0a55b298d9 systemctl: don't try rebooting with /dev/initcl if Upstart worked 2011-07-14 18:05:33 +02:00
Lennart Poettering
aca4c78676 systemctl: fix --help syntax for variables 2011-07-08 21:45:59 +02:00
Lennart Poettering
a4c279f874 loginctl: add various introspection functions 2011-07-08 21:39:10 +02:00
Lennart Poettering
69fc152fc1 systemctl: hide all information on --kill-mode= since it is mostly useless 2011-07-07 04:19:03 +02:00
Lennart Poettering
ef3a24de02 systemctl: use cached tty value where possible 2011-07-07 03:30:47 +02:00
Lennart Poettering
3b0727f5ec systemctl: cache tty value before we open the pager 2011-07-07 03:30:31 +02:00
Lennart Poettering
abca482291 loginctl: add basic implementation of loginctl for introspecting controlling sessions/users/seats 2011-07-07 03:29:56 +02:00
Lennart Poettering
1968a36040 cgls: add pager support to systemd-cgls 2011-07-07 02:34:35 +02:00
Michal Schmidt
52c002150a shutdown: respect the dry run option '-k'
Don't do the actual power-off/reboot when '-k' is passed to shutdown.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=624149
2011-07-03 00:12:16 +02:00
Michal Schmidt
1a63987788 shutdown: accept minutes argument without '+'
Both SysVinit's and upstart's shutdown commands accept the number of
minutes with or without the plus sign.
'shutdown -h 1' works in RHEL 5, Fedora 14, Debian 6.
Let's be compatible.

https://bugzilla.redhat.com/show_bug.cgi?id=708886
2011-07-03 00:11:22 +02:00
Frederic Crozat
be394c48a7 systemctl: add support for --root for systemctl enable/disable/is-enabled
Add --root=<root> for enable/disable/is-enabled systemctl commands. To
be used for easily enable / disable systemd services for a chroot,
without running systemctl inside chroot.
2011-06-27 14:08:16 +02:00
Ville Skyttä
abebb5af9a systemctl: Add SYSTEMD_PAGER for setting the pager to use in systemctl 2011-06-20 17:59:59 +02:00
Jim Meyering
23b2a3300c systemctl: plug a leak upon create_symlink mismatch 2011-06-15 20:44:28 +02:00
Alexey Shabalin
d9eaa2d538 systemctl: enable chkconfig support in systemctl for ALTLinux 2011-06-15 20:13:36 +02:00
Michal Schmidt
b647f10da7 systemctl: fix a FILE* leak
In practice it does not really matter, but let's be nice and close the
file.
2011-06-14 21:59:14 +02:00
Michal Schmidt
b77398f7a0 systemctl: fix 'is-enabled' for native units under /lib
The units always showed up as enabled.

The config file has to be parsed before we can check what's in
the [Install] section.

https://bugzilla.redhat.com/show_bug.cgi?id=699027
2011-06-14 21:58:29 +02:00
Frederic Crozat
dc725264f3 enable chkconfig support in systemctl for openSUSE 2011-06-09 13:31:26 +02:00
Michal Schmidt
78e39b43b8 systemctl: fix double unref of a dbus message 2011-06-05 17:22:37 +02:00
Lennart Poettering
b23de6af89 dbus: make daemon reexecution synchronous
We simply keep open copies of the dbus connections across the
reexecution and close them as last step of it. A client can thus simply
wait until its connection is dropped to know when the reexecution is
finished.

https://bugzilla.redhat.com/show_bug.cgi?id=698198
2011-04-28 22:07:01 +02:00
Lennart Poettering
e190aa0be1 systemctl: whitelist /etc instead of blacklisting /lib to figure out if [Install] is needed 2011-04-27 22:30:50 +02:00
Chris E Ferron
54e4fdef80 MeeGo support
This commit consists of the initial work to include MeeGo as a ported
distribution for systemd.

The majority of the changes are small configuration additions to auto
tools, so that MeeGo is identified as a valid distribution option.

Some small deviations will be noticed between the configuration of MeeGo
and other distributions. As MeeGo is a distribution striving for
compliancy to support its near embedded attributes and target users,
there is less user configuration options available by default. Most
services will be enabled by systemd as part of the distribution
requirements, and as such most links and service files will be pre-setup
for the MeeGo distribution. As much of this is going to be done within
the MeeGo distribution packaging this is still noteworthy to mention, as
it explains why in systemd you will observe configuration differences
where the MeeGo distribution removes all links in the pkgsysconfdir for
instance.  MeeGo will be user configurable if there is desire, but most
services will be enabled by the distribution as designated by the MeeGo
compliancy standards.

Other changes are in source to add such areas as meego-release defined
in utils, and hostname in hostname-setup, defining vconsole-setup,
localizations and rescue additions as needed.

As this is all ground work, MeeGo will continue to strive for complete
compatibility.
2011-04-20 01:05:30 +02:00
Lennart Poettering
3d3961f267 systemctl: always consider unit files with no [Install] section but stored in /lib enabled 2011-04-16 03:29:54 +02:00
Lennart Poettering
b21a0ef8fc dbus: expose monotonic timestamps on the bus 2011-04-07 21:35:37 +02:00
Lennart Poettering
017803e242 systemctl: properly parse JobNew signals
https://bugzilla.redhat.com/show_bug.cgi?id=693274
2011-04-06 02:46:13 +02:00
Lennart Poettering
82e23dddeb systemctl: make most operations NOPs in a chroot 2011-04-06 01:35:56 +02:00
Lennart Poettering
964d124efa systemctl: don't truncate description when using pager
https://bugs.freedesktop.org/show_bug.cgi?id=35725
2011-03-29 18:54:37 +02:00
Lennart Poettering
3731f1eaa8 conf-parser: fix remaining parser functions according to new prototype 2011-03-28 23:04:30 +02:00
Kay Sievers
2b583ce657 use /run instead of /dev/.run
Instead of the /dev/.run trick we have currently implemented, we decided
to move the early-boot runtime dir to /run.

An existing /var/run directory is bind-mounted to /run. If /var/run is
already a symlink, no action is taken.

An existing /var/lock directory is bind-mounted to /run/lock.
If /var/lock is already a symlink, no action is taken.

To implement the directory vs. symlink logic, we have a:
  ConditionPathIsDirectory=
now, which is used in the mount units.

Skipped mount unit in case of symlink:
  $ systemctl status var-run.mount
  var-run.mount - Runtime Directory
    Loaded: loaded (/lib/systemd/system/var-run.mount)
    Active: inactive (dead)
            start condition failed at Fri, 25 Mar 2011 04:51:41 +0100; 6min ago
     Where: /var/run
      What: /run
    CGroup: name=systemd:/system/var-run.mount

The systemd rpm needs to make sure to add something like:
  %pre
  mkdir -p -m0755 /run >/dev/null 2>&1 || :
or it needs to be added to filesystem.rpm.

Udev -git already uses /run if that exists, and is writable at bootup.
Otherwise it falls back to the current /dev/.udev.

Dracut and plymouth need to be adopted to switch from /dev/.run to run
too.

Cheers,
Kay
2011-03-28 23:00:00 +02:00
Lennart Poettering
b74949bcdc chkconfig: check against runlevel 5 instead of 3, since it is a superset of the latter 2011-03-17 03:42:25 +01:00
Lennart Poettering
a76f7be2b0 systemctl: accept condstop as alias for stop 2011-03-17 03:41:51 +01:00
Lennart Poettering
91b22f21f3 core: move abstract namespace sockets to /dev/.run
Now that we have /dev/.run there's no need to use abstract namespace
sockets. So, let's move things to /dev/.run, to make things more easily
discoverable and improve compat with chroot() and fs namespacing.
2011-03-14 03:12:25 +01:00
Lennart Poettering
a8f11321c2 systemctl: support remote and privileged systemctl access via SSH and pkexec
This adds support for executing systemctl operations remotely or as
privileged user while still running systemctl itself unprivileged and
locally.

This currently requires a D-Bus patch to work properly.

https://bugs.freedesktop.org/show_bug.cgi?id=35230
2011-03-12 01:07:17 +01:00
Lennart Poettering
90bbc9469e condition: take a timestamp and store last result of conditions 2011-03-09 23:58:17 +01:00
Andrey Borzenkov
1de4d79bf5 build-sys: add Mandriva distribution support
This merges several separate patches that I carry as part of
Mandriva systemd RPM. They touch those parts that are very
unlikely to be changed in near future and do not impose any
functionality change for systemd core. I also think it is
useful for troubleshooting to have real distribution name in
system logs, espicially when someone reports problem upstream.

The patch looks bigger than sum of replaced patches because

- previous patches were applied on top of distro=fedora, now
I need to add all those bits for distro=mandriva as well

- part of patch was done as spec file magic, but it seems more
logical to ship all these bits together
2011-03-08 19:47:36 +01:00
Lennart Poettering
83310f162d systemctl: when forwarding is-enabled to chkconfig hardcode runlevel 3 2011-03-08 01:53:47 +01:00
Lennart Poettering
d68201e9aa job: introduce new job result code 'skipped' to use when pre conditions of job did not apply
https://bugzilla.redhat.com/show_bug.cgi?id=682245
https://bugzilla.redhat.com/show_bug.cgi?id=635780
2011-03-08 01:53:47 +01:00
Lennart Poettering
63a723f3a7 systemctl: fix exit code when directing is-enabled to chkconfig 2011-03-04 19:48:38 +01:00
Lennart Poettering
8c7be95e5a execute: load environment files at time of execution, not when we load the service configuration
https://bugzilla.redhat.com/show_bug.cgi?id=661282
2011-03-04 03:44:43 +01:00