1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

406 Commits

Author SHA1 Message Date
Lennart Poettering
d2a3097582 systemctl: add new "get-cgroup-attr" to query current cgroup attribute value
Also adds a pair of bus calls for this to the daemon.
2013-01-18 01:44:41 +01:00
Nestor Ovroy
8755586eba core: corrects check of strduped controller string
In commit 246aa6d (core: add bus API and systemctl commands for altering
cgroup parameters during runtime), when rewriting unit_add_one_default_cgroup
to prefered style, the check of strduped b->controller was incorrectly
changed to check the containing structure. Correct it.
2013-01-17 09:31:50 -05:00
Lennart Poettering
464876c9c4 service: properly signal permanent failure of a service to its socket
This makes sure that a service is not indefinitely restarted in a tight
loop if it fails before it is able to process its socket.

This corrects the breakage introduced with
8d1b002a2e. Shame on me.
2013-01-17 04:54:34 +01:00
Lennart Poettering
74051b9b58 units: for all unit settings that take lists, allow the empty string for resetting the lists
https://bugzilla.redhat.com/show_bug.cgi?id=756787
2013-01-17 02:50:05 +01:00
Lennart Poettering
4b20075e2f dbus: add Unit's PartOf and ConsistsOf deps to introspection XML 2013-01-17 02:50:05 +01: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
Lukas Nykryn
9bdbc2e2ec systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is specified
New file output.h with output flags and modes.

--full parameter also for cgls and loginctl.

Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup,
show_cgroup_and_extra, show_cgroup_and_extra_by_spec).

get_process_cmdline with max_length == 0 will not ellipsize output.

Replace LINE_MAX with 0 in some calls of get_process_cmdline.

[zj: Default to --full when under pager for clgs.
     Drop '-f' since it wasn't documented and didn't actually work.
     Reindent a bit.
]
2013-01-16 12:11:47 -05:00
Kay Sievers
bdffb521d0 shutdown: ignore loop devices without a backing file 2013-01-16 04:35:54 +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
0c08f5cde7 shutdown: in the final umount loop don't use MNT_FORCE
MNT_FORCE is honoured by NFS and FUSE and allows unmounting of the FS
even if consumers still use it. For our brute-force loop we rely on
EBUSY being reported as long as a file system is still used by a
loopback device or suchlike. Hence, drop MNT_FORCE to make EBUSY
reliable.
2013-01-16 04:03:57 +01:00
Lennart Poettering
cd7409576d load-fragment: fix bad memory access 2013-01-15 21:45:37 +01:00
Lennart Poettering
858c33bf60 load-fragment: replace specifiers in path unit's Unit= setting 2013-01-15 21:37:17 +01:00
Michał Bartoszkiewicz
7d0c710d72 core: do not make sockets dependent on lo
/sys/subsystem/net/devices/lo is never considered active, so sockets
with BindToDevice=lo would never be activated.
2013-01-15 21:00:11 +01:00
Michal Sekletar
38c888a404 core: use correct argument of type JobResult 2013-01-15 20:50:33 +01:00
Lennart Poettering
246aa6dd9d core: add bus API and systemctl commands for altering cgroup parameters during runtime 2013-01-14 21:24:57 +01:00
Lennart Poettering
83dd76170d core: fix double free 2013-01-14 21:24:57 +01:00
Lennart Poettering
fbeefb45ac service: for Type=forking services, ignore exit status of main process depending on ExecStart's ignore setting
https://bugzilla.redhat.com/show_bug.cgi?id=860464
2013-01-14 21:05:17 +01:00
Kay Sievers
20771ae336 service: remove distribution specific comments, the code runs unconditional now 2013-01-12 23:50:56 +01:00
Kay Sievers
85a3fa0e19 service: remove distribution specific comments, the code run unconditional now 2013-01-12 23:31:46 +01:00
Lennart Poettering
5926cccae2 unit: instead of directly loading drop-in configuration snippets use conf_files_list_strv()
This has the benefit of allowing the usual overriding/masking knowledge
everybody loves so much.
2013-01-11 01:04:11 +01:00
Lennart Poettering
8afbb8e118 unit: allow extension of unit files with .d/*.conf drop-ins
For all unit files foobar.service we will now read
foobar.service.d/*.conf, too. This may be used to override certain unit
settings without having to edit unit files directly.

This makes it really easy to change specific settings for services
without having to edit any unit file:

mkdir /etc/systemd/system/avahi-daemon.service.d/
echo -e '[Service]\nNice=99' > /etc/systemd/system/avahi-daemon.service.d/nice.conf
systemctl daemon-reload
2013-01-11 00:21:06 +01:00
Lennart Poettering
5dd9014faf dbus: duplicate Job.Cancel() as CancelJob() and Snapshot.Remove() as RemoveSnapshot() on the Manager interface
For all other object mehtods there are already counterparts on the
manager object, as they help us reduce round-trips. So let's complete
this, and reduce complexity on the client side a bit.

As a side effect this also makes "systemctl snapshot" without arguments
work again.
2013-01-10 23:03:48 +01:00
Lennart Poettering
b719810db4 dbus: properly serialize calendar timer data
As it turns out the bus properties for timer units wre really broken,
so let's clean this up for good and properly add calendar timer
serialization. We really should get that right before finalizing the
bus API documentation in the wiki...
2013-01-10 00:56:32 +01:00
Thomas Hindoe Paaboel Andersen
b929bf049d tabs to spaces
Skipped bootchart and various files that looked like they should be
kept in sync with external sources.
2013-01-09 21:20:43 +01:00
Lennart Poettering
3761902e2e dbus: fix serialization of calendar timers 2013-01-08 20:00:01 +01:00
Lennart Poettering
cae0c5e042 core: properly initialize kernel timestamp 2013-01-08 01:27:39 +01:00
Zbigniew Jędrzejewski-Szmek
66870f90de systemd: use unit logging macros 2013-01-06 13:52:48 -05:00
Zbigniew Jędrzejewski-Szmek
fdf9f9bbe4 journal: new logging macros to include UNIT=
Adding UNIT= to log lines allows them to be shown
in 'systemctl status' output, etc.

A new set of macros and functions is added. This allows for less
verbose notation than using log_struct() explicitly.

The set of logging functions is expanded to take a pair of arguments
(e.g. "UNIT=" and the RHS) which add an extra line to the structured
log entry. This can be used to add macros which add a different
identifier later on.
2013-01-06 13:52:48 -05:00
Zbigniew Jędrzejewski-Szmek
15f55e8092 core/path: modernize style 2013-01-06 13:52:47 -05:00
Zbigniew Jędrzejewski-Szmek
4f0eedb703 core/mount: modernize style 2013-01-06 13:52:47 -05:00
Zbigniew Jędrzejewski-Szmek
f93891f3ec core/dbus-unit: modernize style 2013-01-06 13:52:47 -05:00
Zbigniew Jędrzejewski-Szmek
bd0af84999 core/manager: modernize style 2013-01-06 13:52:47 -05:00
Zbigniew Jędrzejewski-Szmek
a83ad683fd service: fixup after ifdef dropping
Commit 88516c0 removed one line too much.
2013-01-04 21:57:55 -05:00
Lennart Poettering
bc2708414b build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore!
2013-01-04 23:26:21 +01:00
Lennart Poettering
425c608d53 service: drop inserv.conf parsing
This Suse specific configuration file should really be done in a generator
that is shipped downstream by suse.
2013-01-04 23:26:21 +01:00
Lennart Poettering
88516c0c95 service: drop the per-distro ifdefs in service.c
They don't really hurt on other distros, and this allows us to ship
the same code on all distros
2013-01-04 23:26:21 +01:00
Lennart Poettering
46a2911bf2 core: drop support for old per-distro configuration files for console, hostname, locale, timezone
This simplifies the upstream system code quite a bit. If downstream distributions want to maintain compatibility with their old configuration files, they are welcome to do so, but need to maintain this as patches downstream. The burden needs to be on the distributions to maintain differences here. Our suggestion however is to just convert the old configuration files on upgrade, as multiple distributions already do.
2013-01-04 23:26:20 +01:00
Pekka Lundstrom
2bef10ab36 Added globbing support to EnvironmentFile
This patch allows globbing to be used with EnvironmentFile option.
Example:
EnvironmentFile=/etc/foo.d/*.conf

t. Pekka
2013-01-04 01:11:50 +01:00
Lennart Poettering
240dbaa44f unit: add ConditionACPower= 2012-12-31 21:24:26 +01:00
Lennart Poettering
f934051c4d shared: move fdset.c from core/ to shared/ since it is used by more than the core now 2012-12-23 11:28:14 +01:00
Lennart Poettering
57cb4adf4e nspawn: try to orderly shutdown container when receiving SIGTERM 2012-12-22 22:17:58 +01:00
Lennart Poettering
01e10de3c2 socket: support socket activation of containers 2012-12-22 22:17:58 +01:00
Lennart Poettering
e83c71637e fdset: add calls for initializing fdset from socket activation fds 2012-12-22 22:17:58 +01:00
Lennart Poettering
ee09281729 socket: properly serialize/desrialize mqueue fds 2012-12-22 22:17:58 +01:00
Dimitrios Apostolou
80cba3795d socket: Too many incoming connections
Hello list,

some socket activated service gave me the error message you can see on
the subject, maybe systemd should be more verbose in that case.

Thanks,
Dimitris
2012-12-19 22:32:52 +01:00
Daniel Wallace
067d851d30 unit: add %U for uids in units 2012-12-19 17:36:24 +01:00
Michal Schmidt
735e071271 shutdown, umount: use verbs consistently
Mounts are "unmounted".
Swaps are "deactivated", not "turned off" nor "disabled".
Loop and DM devices are "detached", not "deleted".

Especially the deleting sounded a bit scary.
2012-12-07 18:55:19 +01:00
Michal Schmidt
bce93b7ac7 shutdown, umount: logging improvements
In bugreports about hangs during the late shutdown we are often missing
important information - what were we trying to unmount/detach when it hung.

Instead of printing what we successfully unmounted, print what we are
going to unmount/detach. And add messages to mark the completion of
categories (mount/swap/loop/DM).
2012-12-07 17:44:50 +01:00
Michal Schmidt
c678406681 umount: fix check for DM changed
delete_dm() returns 0 on success. The check for "r > 0" was likely
a copy&paste error from the loopback code where "r > 0" makes sense.
2012-12-07 17:34:21 +01:00
Michal Schmidt
2569a5ce16 shutdown: downgrade a warning
All messages of the kind "not all done, %d left" are log_info, except
the one for DM devices. Make it info too.
2012-12-07 17:28:30 +01:00