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

22473 Commits

Author SHA1 Message Date
Lennart Poettering
fa2f8973ad sd-bus: introduce new sd_bus_default_flush_close() call
If code enqueues a message on one of the default busses, but doesn't
sync on it, and immediately drops the reference to the bus again, it
will stay queued and consume memory. Intrdouce a new call
sd_bus_default_flush_close() that can be invoked at the end of programs
(or threads) and flushes out all unsent messages on any of the default
busses.
2015-09-22 16:29:10 +02:00
doubleodoug
fc4049c1ab login: support more than just power-gpio-key
Adding additional keys prevents this gpio-keys powerswitch from working,
e.g. this wouldn't poweroff:

button@23 {
    label = "power-switch";
    linux,code = <116>;
    gpios = <&gpio 23 1>;
};
button@25 {
    label = "KEY_A";
    linux,code = <30>;
    gpios = <&gpio 25 1>;
};

Changing ATTRS{keys}=="116" to ATTRS{keys}=="*116*" makes the
power-switch and the A key both work properly.

(David: rephrase and merge-commits)
2015-09-22 16:18:17 +02:00
Lennart Poettering
9c90e27767 Merge pull request #1333 from dvdhrm/sd-network-cleanup
sd-network: random API cleanups
2015-09-22 15:31:55 +02:00
David Herrmann
9ef61f2e48 sd-lldp: hide internal details
Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic
constant '10'. This is completely bogus, so fix it to follow our coding
standards:

  - Prefix exported symbols by SD_LLDP_*

  - Define a separate event-enum for event types

  - Translate internal state to external event-types
2015-09-22 15:19:42 +02:00
David Herrmann
8955cf0a45 sd-lldp: hide internal information
Don't export constant that are only used internally.
2015-09-22 15:14:49 +02:00
David Herrmann
e4c3b8e856 sd-pppoe: fix namespacing
Prefix all exported constants by SD_PPPOE_* to avoid namespacing
conflicts.
2015-09-22 15:09:58 +02:00
David Herrmann
be19c5b5e0 sd-ipv4ll: fix namespacing
Prefix all exported constants with SD_IPV4LL_* to avoid namespacing
conflicts.
2015-09-22 15:08:28 +02:00
David Herrmann
2237aa02f3 sd-ipv4acd: fix namespacing
Prefix all exported constants with SD_IPV4ACD to prevent namespacing
conflicts.
2015-09-22 15:05:35 +02:00
David Herrmann
575ac4c62e sd-icmp6-nd: fix namespacing
Prefix all exported constants by SD_ICMP6_ND_* to avoid any namespacing
conflicts.
2015-09-22 15:01:55 +02:00
David Herrmann
10c9ce615d sd-dhcp6: fix namespacing
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any
namespacing conflicts.
2015-09-22 14:52:23 +02:00
David Herrmann
0374814250 sd-dhcp: fix namespacing
Prefix all constants with SD_DHCP_CLIENT_* to avoid namespacing
conflicts.
2015-09-22 14:46:21 +02:00
Thomas Haller
f89087272b sd-dhcp6: ensure canceling lease timers and refactor setting lease
Factor our common code to set/clear the client lease.
Resetting the lease involves canceling old timers.

Also, most importantly, when resetting the lease
in client_receive_advertise(), ensure to cancel
the timers too. It is not immediately clear, why
at that point no timers would be pending.

The lease-unref from sd_dhcp6_client_unref() can
be omited, because of the preceeding client_reset()
call.
2015-09-22 14:41:47 +02:00
Lennart Poettering
85fade1edb Merge pull request #986 from karelzak/monitor
mount: use libmount to monitor mountinfo & utab
2015-09-22 14:31:58 +02:00
Lennart Poettering
29e71235c7 Merge pull request #1331 from dvdhrm/misc-cleanup
util, nspawn, machined: random cleanups
2015-09-22 14:30:09 +02:00
Krzesimir Nowak
c0ffce2bd1 nspawn, machined: fix comments and error messages
A bunch of "Client -> Child" fixes and one barrier-enumerator fix.

(David: rebased on master)
2015-09-22 14:17:03 +02:00
Krzesimir Nowak
327e26d689 nspawn: close unneeded sockets in outer child
(David: Note, this is just a cleanup and doesn't fix any bugs)
2015-09-22 14:11:44 +02:00
David Herrmann
d960371482 util: introduce {send,receive}_one_fd()
Introduce two new helpers that send/receive a single fd via a unix
transport. Also make nspawn use them instead of hard-coding it.

Based on a patch by Krzesimir Nowak.
2015-09-22 14:09:54 +02:00
Daniel Mack
c97e586d8a NEWS: add some information about v227 2015-09-22 13:30:12 +02:00
Pawel Szewczyk
15087cdbd6 core: Add list of additional file descriptors to socket port
Some additional files related to single socket may appear in the
filesystem and they should be opened and passed to related service.

This commit adds optional list of file descriptors, which are
dynamically discovered and opened.
2015-09-22 12:01:53 +02:00
Lennart Poettering
8e112c803c Merge pull request #1323 from dvdhrm/mount-propagate
mount: propagate error codes correctly
2015-09-22 02:34:45 +02:00
Lennart Poettering
a45ad24e05 Merge pull request #1325 from splantefeve/fr-translation
po: update french translation
2015-09-22 01:05:27 +02:00
Sylvain Plantefève
88660ac6e8 po: update french translation 2015-09-22 00:25:13 +02:00
Tom Lyon
cf22cddcfd Fixup WWN bytes for big-endian systems 2015-09-21 14:36:32 -07:00
David Herrmann
0ac58d849f hwdb: fix typo in G9x DPI
Fix typo in DPI: 32000 -> 3200
2015-09-21 21:56:10 +02:00
David Herrmann
ed1236bed8 hwdb: drop weird whitespace
Remove whitespace from empty line in hwdb.
2015-09-21 20:19:23 +02:00
Daniel Mack
2eacee1e71 Merge pull request #1317 from ronnychevalier/rc/ipv4ll_seed
sd-ipv4ll: do not assert_return when seed == 0
2015-09-21 20:05:18 +02:00
David Herrmann
7ff307bc4c mount: propagate error codes correctly
Make sure to propagate error codes from mount-loops correctly. Right now,
we return the return-code of the first mount that did _something_. This is
not what we want. Make sure we return an error if _any_ mount fails (and
then make sure to return the first error to not hide proper errors due to
consequential errors like -ENOTDIR).

Reported by cee1 <fykcee1@gmail.com>.
2015-09-21 20:03:24 +02:00
Daniel Mack
dd2c1128db Merge pull request #1322 from evverx/update-systemd-cgtop-bash-completion
Update systemd-cgtop bash completion
2015-09-21 19:43:49 +02:00
Evgeny Vereshchagin
a2accacb98 shell-completion: cgtop bash completion: add -r,--raw,-k,-P,--order 2015-09-21 17:33:00 +00:00
Evgeny Vereshchagin
79af4b6c1c shell-completion: cgtop bash completion: -n,--iterations,-d,--delay require arg 2015-09-21 17:09:40 +00:00
Lennart Poettering
de45f28e09 Merge pull request #1249 from lnykryn/sysv-symlinks
sysv-generator: follow symlinks in /etc/rc.d/init.d
2015-09-21 19:00:28 +02:00
Lennart Poettering
acf0813d21 Merge pull request #1321 from evverx/cgtop-recurisive-option
shell-completion: update systemd-cgtop bash completion: --recursive
2015-09-21 18:59:38 +02:00
Evgeny Vereshchagin
73b73b762c shell-completion: update systemd-cgtop bash completion: --recursive 2015-09-21 16:54:58 +00:00
Lennart Poettering
f1f679c5b6 Merge pull request #1320 from ronnychevalier/rc/core_fix_group_ownership
core: fix group ownership when Group is set
2015-09-21 18:21:53 +02:00
Ronny Chevalier
5bc7452b32 core: fix group ownership when Group is set
When Group is set in the unit, the runtime directories are owned by
this group and not the default group of the user (same for cgroup paths
and standard outputs)

Fix #1231
2015-09-21 18:14:44 +02:00
Ronny Chevalier
cc3ddc851f test-execute: add tests for RuntimeDirectory 2015-09-21 18:14:44 +02:00
Lennart Poettering
35bb18851a Merge pull request #1315 from systemd-mailing-devs/1442692671-10134-1-git-send-email-dev@benjarobin.fr
systemd-notify: Always pass a valid pid to sd_pid_notify
2015-09-21 18:10:49 +02:00
Alban Crequy
0c5c00f6ef Merge pull request #1318 from alban/alban/container-exit-code4
containers: systemd exits with non-zero code
2015-09-21 17:51:21 +02:00
Alban Crequy
287419c119 containers: systemd exits with non-zero code
When a systemd service running in a container exits with a non-zero
code, it can be useful to terminate the container immediately and get
the exit code back to the host, when systemd-nspawn returns. This was
not possible to do. This patch adds the following to make it possible:

- Add a read-only "ExitCode" property on PID 1's "Manager" bus object.
  By default, it is 0 so the behaviour stays the same as previously.
- Add a method "SetExitCode" on the same object. The method fails when
  called on baremetal: it is only allowed in containers or in user
  session.
- Add support in systemctl to call "systemctl exit 42". It reuses the
  existing code for user session.
- Add exit.target and systemd-exit.service to the system instance.
- Change main() to actually call systemd-shutdown to exit() with the
  correct value.
- Add verb 'exit' in systemd-shutdown with parameter --exit-code
- Update systemctl manpage.

I used the following to test it:

| $ sudo rkt --debug --insecure-skip-verify run \
|            --mds-register=false --local docker://busybox \
|            --exec=/bin/chroot -- /proc/1/root \
|            systemctl --force exit 42
| ...
| Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42.
| $ echo $?
| 42

Fixes https://github.com/systemd/systemd/issues/1290
2015-09-21 17:32:45 +02:00
Ronny Chevalier
5625be76c7 test-ipv4ll: use unsigned instead of an array for a seed
ipv4ll use an unsigned instead of an uint8_t array. Hence, use an
unsigned seed instead of declaring an array and then dereferencing it
later.
2015-09-21 16:52:52 +02:00
Ronny Chevalier
56065db421 sd-ipv4ll: do not assert_return when seed == 0
Now that seed is an unsigned and not an array, we do not need to assert
on it.
2015-09-21 16:52:52 +02:00
Tom Gundersen
a1b7a5bbdd Merge pull request #1288 from teg/ipv4acd-3
sd-ipv4acd: split out as separate library from sd-ipv4ll
2015-09-21 15:13:18 +02:00
Lennart Poettering
26ce779618 Merge pull request #1311 from jsynacek/kill-errors-v2
core: extend KillUnit() to return error when no unit was killed
2015-09-21 15:04:23 +02:00
Lennart Poettering
213634e476 Merge pull request #1314 from evverx/cgtop-machine
cgtop: add -M/--machine
2015-09-21 14:55:48 +02:00
Evgeny Vereshchagin
96a6426f30 cgtop: add -M/--machine 2015-09-21 12:04:45 +00:00
Jan Synacek
ac5e3a505e core: extend KillUnit() to return error when no unit was killed 2015-09-21 10:05:49 +02:00
Lennart Poettering
8c710f3ce6 Merge pull request #1292 from gebi/resolve-specifier-in-runtime-directory
load-fragment: resolve specifiers in RuntimeDirectory
2015-09-20 19:15:04 +02:00
Lennart Poettering
4b8b34855e Merge pull request #1305 from mrkara/master
[l10n] Added Turkish translation
2015-09-20 19:14:37 +02:00
Lennart Poettering
570b3e835e Merge pull request #1309 from nazgul77/master
[l10n] Update German translation
2015-09-20 19:14:09 +02:00
nazgul77
5252cfb433 Update German translation 2015-09-20 14:54:34 +02:00