1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 23:51:28 +03:00
Commit Graph

12129 Commits

Author SHA1 Message Date
Tom Gundersen
88ac30a197 mount: filesystems mounted in the initrd should not conflict with umount.target in the real root
These mounts should be kept around and unmounted in the shutdown ramfs.

Currently, we will still attempt to umount these in the final kill spree, but
we should consider avoiding that too. Also, the should_umount function should
be generalised and put into util.c or something like that, but we are still
discussing precisely how.
2013-09-11 14:42:36 +02:00
Tom Gundersen
5073f89f10 mount: move device links handling from generator
This makes mount units work like swap units: when the backing device appears
the mount unit will be started.

v2: the device should want the mount unconditionally, not only for DefaultDependencies=yes
2013-09-11 14:40:59 +02:00
Tom Gundersen
b56a422a91 swap: backing device should unconditionally want swap unit
There is no need to restrict this to only the 'nofail' case. In the '!nofail'
case the unit is already wanted by swap.target, so this is not a functional change.
2013-09-11 14:40:59 +02:00
Tom Gundersen
80c3b720bf fstab-generator: use DefaultDependencies=yes
This removes some redundancy between the generator and the core mount handling.
2013-09-11 14:40:59 +02:00
Tom Gundersen
40f862e3ae filesystem targets: disable default dependencies
This means we can use default dependencies on mount units without having to get them automatically
ordered before the filesystem targets.

Reported-by: Thomas Baechler <thomas@archlinux.org>
2013-09-11 14:40:58 +02:00
Lennart Poettering
1361a3e33a man: document that Type=notify is currently incompatible with PrivateNetwork=yes 2013-09-11 13:57:54 +02:00
Lukas Nykryn
1e44448168 man: one more example in tmpfiles.d 2013-09-10 18:51:43 +02:00
Jan Engelhardt
6b4991cfde man: wording and grammar updates
This includes regularly-submitted corrections to comma setting and
orthographical mishaps that appeared in man/ in recent commits.

In this particular commit:
- the usual comma fixes
- expand contractions (this is prose)
2013-09-10 18:34:41 +02:00
Gao feng
b8ab2dc6c9 systemctl: show BlockIODeviceWeight for unit
We can use systemctl show unitname to show the BlockIODeviceWeight
of unit.
2013-09-10 18:32:32 +02:00
Gao feng
7239c1707a systemcl: add support for setting BlockIODeviceWeight for unit
This patch allows user to set up BlockIODeviceWeight for unit
through systemctl. Such as

systemctl set-property sshd.service BlockIODeviceWeight="/dev/sda 100"
2013-09-10 18:31:43 +02:00
Gao feng
6f68ecb450 cgroup: setup BlockIODeviceWeight in bus_cgroup_set_property
This patch adds the support for setting up BlockIODeviceWeight
in bus_cgroup_set_property. most of the codes are copied from
the case that sets up DeviceAllow.
2013-09-10 18:24:34 +02:00
Lennart Poettering
06eb4e3bf8 cgroup: compare fs paths with path_equal() rather than streq() 2013-09-10 18:21:10 +02:00
Gao feng
670612567b systemcl: add support for setting BlockIORead/WriteBandwidth for unit
This patch allows user to set up BlockIOReadBandwidth and BlockIOWriteBandwidth
for unit through systemctl. Such as

systemctl set-property sshd.service BlockIOReadBandwidth="/dev/sda 100000"
systemctl set-property sshd.service BlockIOWriteBandwidth="/dev/sda 200000"
2013-09-10 17:29:55 +02:00
Gao feng
f004c2ca11 cgroup: setup BlockIORead/WriteBandwidth in bus_cgroup_set_property
This patch adds the support for setting up BlockIORead/WriteBandwidth
in bus_cgroup_set_property.
2013-09-10 17:23:07 +02:00
Gao feng
47c0980d37 blkio bandwidth: don't clean up all of entries in blockio_device_bandwidths list
if we get BlockIOReadBandwidth="", we should only remove the
read-bandwidth-entries in blockio_device_bandwidths list.
2013-09-10 17:12:13 +02:00
Lukas Nykryn
27722f9643 man: split systemctl commands to sections 2013-09-10 17:01:49 +02:00
Lukas Nykryn
9285c9ff26 service: remove pidfile after exit of a service 2013-09-10 16:58:04 +02:00
Zbigniew Jędrzejewski-Szmek
5ca8c5d977 man: add not to not use -x in bug reports 2013-09-10 08:27:30 -04:00
Zbigniew Jędrzejewski-Szmek
289f910e16 journald: be a bit more verbose when vacuuming
Vacuuming behaviour is a bit confusing, and/or we have some bugs,
so those additional messages should help to find out what's going
on. Also, rotation of journal files shouldn't be happening too
often, so the level of the messages is bumped to info, so that
they'll be logged under normal operation.
2013-09-10 08:27:30 -04:00
Martin Pitt
33e74db266 keymap: Add Asus WMI module
We need to override the TOUCHPAD_TOGGLE to F21 to make it useful under X, as
for other models.
2013-09-09 17:41:03 -04:00
Marcel Holtmann
046d2bd446 build-sys: gpt-auto-generator depends on HAVE_BLKID 2013-09-09 17:35:52 -04:00
Zbigniew Jędrzejewski-Szmek
4bcc8c3cb5 Fix two compiler warnings 2013-09-09 17:35:52 -04:00
Zbigniew Jędrzejewski-Szmek
c9d954b27e run: allow non-absolute paths as command 2013-09-09 13:49:30 -04:00
Zbigniew Jędrzejewski-Szmek
116cc02874 path-util.c: small modernization 2013-09-09 13:49:30 -04:00
Zbigniew Jędrzejewski-Szmek
a6fde35332 systemd-run: properly escape arguments
Spaces, quotes, and such, were not properly escaped. We should
write them like we read them.

https://bugs.freedesktop.org/show_bug.cgi?id=67971
2013-09-09 13:49:29 -04:00
Dave Reisner
a012ab5293 TODO: update todo 2013-09-06 16:26:55 -04:00
Zbigniew Jędrzejewski-Szmek
32ce5ae22b man: fix typo
https://bugs.freedesktop.org/show_bug.cgi?id=68723
2013-09-06 13:15:23 +02:00
Andrew Cook
92f2ff4415 systemd-coredump: Log crashes without coredumps on failure
Make a best-effort attempt to store information about crashes during
failure, currently if these are encountered the crash is completely
silenced.

ideally coredumpctl would show if a coredump is available.
2013-09-06 10:09:55 +02:00
Andrew Cook
ca0ceb6f3e systemd-coredump: Ignore coredumps larger than COREDUMP_MAX
Currently this check happens when the coredump has been collected in
it's entirety and being received by journald. this is not ideal
behaviour when the crashing process is consuming significant percentage
of physical memory such as a large instance of firefox or a java
application.
2013-09-06 10:09:54 +02:00
George McCollister
489798614c journald: fix fd leak in journal_file_empty
Before my previous patch, journal_file_empty wasn't be called with the
correct filename. Now that it's being called with the correct filename
it leaks file descriptors. This patch closes the file descriptors before
returning.

Signed-off-by: George McCollister <george.mccollister@gmail.com>

[Edit harald@redhat.com: make use of _cleanup_close_ instead]
2013-09-06 07:11:25 +02:00
George McCollister
629bfc5a7f journald: fix vacuuming of archived journals
d_name is modified on line 227 so if the entire journal name is needed
again p must be used. Before this change when journal_file_empty was called
on archived journals it would always return with -2.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
2013-09-06 07:07:54 +02:00
Kay Sievers
756c9a2499 libudev: enumerate - do not try to match against an empty subsystem 2013-09-04 17:59:14 +02:00
David Herrmann
f9e84da678 libudev: enumerate: fix NULL-deref for subsystem-matches
udev_device_get_subsystem() may return NULL if no subsystem could be
figured out by libudev. This might be due to OOM or if the device
disconnected between the udev_device_new() call and
udev_device_get_subsystem(). Therefore, we need to handle subsystem==NULL
safely.

Instead of testing for it in each helper, we treat subsystem==NULL as
empty subsystem in match_subsystem().

Backtrace of udev_enumerate with an input-device disconnecting in exactly
this time-frame:
 (gdb) bt
 #0  0x00007ffff569dc24 in strnlen () from /usr/lib/libc.so.6
 #1  0x00007ffff56d9e04 in fnmatch@@GLIBC_2.2.5 () from /usr/lib/libc.so.6
 #2  0x00007ffff5beb83d in match_subsystem (udev_enumerate=0x7a05f0, subsystem=0x0) at src/libudev/libudev-enumerate.c:727
 #3  0x00007ffff5bebb30 in parent_add_child (enumerate=enumerate@entry=0x7a05f0, path=<optimized out>) at src/libudev/libudev-enumerate.c:834
 #4  0x00007ffff5bebc3f in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x7a56b0 "/sys/devices/<shortened>/input/input97", maxdepth=maxdepth@entry=254) at src/libudev/libudev-enumerate.c:866
 #5  0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x79e8c0 "/sys/devices/<shortened>/input", maxdepth=maxdepth@entry=255) at src/libudev/libudev-enumerate.c:868
 #6  0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=path@entry=0x753190 "/sys/devices/<shortened>", maxdepth=maxdepth@entry=256) at src/libudev/libudev-enumerate.c:868
 #7  0x00007ffff5bec7df in scan_devices_children (enumerate=0x7a05f0) at src/libudev/libudev-enumerate.c:882
 #8  udev_enumerate_scan_devices (udev_enumerate=udev_enumerate@entry=0x7a05f0) at src/libudev/libudev-enumerate.c:919
 #9  0x00007ffff5df8777 in <random_caller> () at some/file.c:181
2013-09-04 17:58:56 +02:00
Brandon Philips
c851f34ba1 cgtop: fixup the online help
The online help shows the keys as uppercase but the code and manpage say
lower case. Make the online help follow reality.
2013-09-04 15:02:06 +02:00
David Herrmann
51cc07576e libudev: fix memleak when enumerating childs
We need to free udev-devices again if they don't match. Funny that no-one
noticed it yet since valgrind is quite verbose about it.
Fix it and free non-matching devices.
2013-09-04 14:56:06 +02:00
Martin Pitt
ee2babf4c3 keymap: Explicitly match "any product name" for "all models from vendor" rules
Without this, the hwdb trie gets mis-sorted to match the more specific rules
first, as ":pvr" is lexicographically after ":pn". So ensure that all our
matches have some ":pn" match to avoid this trap.
2013-09-02 08:15:49 +02:00
Martin Pitt
78f66c2151 keymap: Fix typo in Latitude/Precision rules
We actually want to match the product name, "pn:" makes no sense.
2013-09-02 07:37:06 +02:00
Harald Hoyer
31c885e9ae main: drop capabilities of userhelpers before ours
First drop the capabilities of the userhelpers before dropping our own,
otherwise we might not be allowed to drop the capabilities of the
userhelpers. Especially, if we want to drop CAP_SYS_MODULE.

Credits: Matteo Sasso
2013-08-30 10:26:49 +02:00
Martin Pitt
b534166eae keymap: Don't use spaces in DMI modalias matches
Spaces get dropped from DMI modaliases. Replace them with '*' to make them
robust against future changes in space escaping.
2013-08-30 06:55:47 +02:00
Martin Pitt
db7c6e6fc8 keymap: Fix Dell vendor names
Spaces are dropped from vendor and product names in DMI modaliases, so a match
like "svnDell Inc.:" will never happen. Also, some machines use "Dell", some
"Dell Inc", some "Dell Inc.", so just match on "Dell*" to avoid all these
traps.

https://launchpad.net/bugs/1218433
2013-08-30 06:55:40 +02:00
Martin Pitt
3f42b51f21 keymap: Don't erase previous assignments
Don't use "KEYBOARD_KEY_xx=!" assignments (i. e. only enabling force-release)
if more general matches already explicitly set a key code before, to not
override the previously set value.

https://launchpad.net/bugs/1218433
2013-08-29 17:48:42 +02:00
Harald Hoyer
b58b8e11c5 Do not realloc strings, which are already in the hashmap as keys
This prevents corruption of the hashmap, because we would free() the
keys in the hashmap, if the unit is already in there, with the same
cgroup path.
2013-08-28 16:02:57 +02:00
Harald Hoyer
3d040cf244 Revert "cgroup.c: check return value of unit_realize_cgroup_now()"
This reverts commit 1f11a0cdfe.
2013-08-28 16:02:39 +02:00
Gao feng
a255a7f144 cgroup: only check once when mode is UNIT_CHECK
If the mode is UNIT_CHECK,it means we only want to check if
the paramaters are valid. the first round of cycle already
did this check, no need to check again.
2013-08-28 08:04:56 -04:00
Gao feng
ad7bfffde5 device cgroup: don't create a new CGroupDeviceAllow when it already in the list
If a device node is already in the device_allow list of
CGroupContext, we should replace it instead of create a
new one and append this new one to the end of device_allow
list.

change from v1: use streq to replace !strcmp
2013-08-28 08:04:56 -04:00
Gao feng
e862b60f1c blcokio bandwidth: add missing set of CGroupBlockIODeviceBandwidth's read
BlockIOReadBandwidth and BlockIOWriteBandwidth both use
config_parse_blockio_bandwidth to set up CGroupBlockIODeviceBandwidth,
We should set the read value based on the left values
in config files.
2013-08-28 08:04:56 -04:00
Zbigniew Jędrzejewski-Szmek
5af726cced logind-session.c: use _cleanup_ 2013-08-28 08:04:56 -04:00
Zbigniew Jędrzejewski-Szmek
042f598892 logind: be more verbose on errors 2013-08-28 08:04:56 -04:00
Zbigniew Jędrzejewski-Szmek
335c46b598 Disallow invalid UTF-8 configuration
It is best to catch such errors early. If invalid UTF-8 ends up being
given to dbus methods, the program will crash:

process 20801: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file dbus-message.c line 2598.
2013-08-28 08:04:56 -04:00
Zbigniew Jędrzejewski-Szmek
fe05567c31 shell-completions: systemd-analyze set-log-level 2013-08-28 08:04:56 -04:00