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

22423 Commits

Author SHA1 Message Date
Susant Sahani
4f2e437ad7 networkd:add support to configure ipv6 acceprt ra
This patch support to configure the ipv6 acceprt ra option.

for more information see
http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/proc-sys-net-ipv6..html
2015-09-12 08:18:06 +05:30
Lennart Poettering
e7ab4d1ac9 cgroup: unify how we invalidate cgroup controller settings
Let's make sure that we follow the same codepaths when adjusting a
cgroup property via the dbus SetProperty() call, and when we execute the
StartupCPUShares= effect.
2015-09-11 18:31:50 +02:00
Lennart Poettering
1afaa7e8d2 transaction: clarify via void-casting that we ignore the pipe2() return value for a reason 2015-09-11 18:31:50 +02:00
Lennart Poettering
cd72bd8a46 core: invalidate idle pipe event source in manager_close_idle_pipe()
In all occasions when this function is called we do so anyway, so let's
move this inside, to make things easier.
2015-09-11 18:31:50 +02:00
Lennart Poettering
c7cc737fce execute: fix return type from write() 2015-09-11 18:31:49 +02:00
Lennart Poettering
54eb2300ae execute: invalidate idle pipe after use
Not strictly necessary, but makes clear the fds are invalidated. Make
sure we do the same here as in most other cases.
2015-09-11 18:31:49 +02:00
Lennart Poettering
5269eb6b32 core: allocate sets of startup and failed units on-demand
There's a good chance we never needs these sets, hence allocate them
only when needed.
2015-09-11 18:31:49 +02:00
Lennart Poettering
aa36007ca1 timesyncd: fix how we print a PID 2015-09-11 18:31:49 +02:00
Lennart Poettering
d53d94743c core: refactor cpu shares/blockio weight cgroup logic
Let's stop using the "unsigned long" type for weights/shares, and let's
just use uint64_t for this, as that's what we expose on the bus.

Unify parsers, and always validate the range for these fields.

Correct the default blockio weight to 500, since that's what the kernel
actually uses.

When parsing the weight/shares settings from unit files accept the empty
string as a way to reset the weight/shares value. When getting it via
the bus, uniformly map (uint64_t) -1 to unset.

Open up StartupCPUShares= and StartupBlockIOWeight= to transient units.
2015-09-11 18:31:49 +02:00
Lennart Poettering
afc966e288 util: remove ring.[ch] + pty.[ch] and tests
This was used by consoled, which was removed, let's remove this too now.
2015-09-11 18:28:29 +02:00
Lennart Poettering
5738311653 TODO 2015-09-11 18:28:03 +02:00
Gabriel de Perthuis
b9c50073fc Hook more properties for transient units
systemd-run can now launch units with PrivateTmp, PrivateDevices,
PrivateNetwork, NoNewPrivileges set.
2015-09-11 18:25:41 +02:00
Lennart Poettering
85bc8c64e9 Merge pull request #1248 from lnykryn/loginctl-show-v2
loginctl: print nontrivial properties in logictl show-*
2015-09-11 16:28:36 +02:00
Lukas Nykryn
7b729f8686 sysv-generator: follow symlinks in /etc/rc.d/init.d
Some java packages puts a symlink to init.d and its content is pointing
to latest java installation (because you can have multiple javas on you
machine).

On rhel-based distributions you can use alternatives --initscript
instread of symlink, but this is not usable for other distributions.
2015-09-11 16:23:07 +02:00
Lukas Nykryn
2a998c7402 loginctl: print nontrivial properties in logictl show-* 2015-09-11 16:04:32 +02:00
Lennart Poettering
f20d2634e1 Merge pull request #1245 from evverx/kill-control-on-timeout
core: kill processes started due to the ExecReload= on timeout
2015-09-11 14:44:45 +02:00
Evgeny Vereshchagin
478b619281 core: kill processes started due to the ExecReload= on timeout 2015-09-11 11:43:27 +03:00
Lennart Poettering
3227b2bced Merge pull request #1227 from intelfx/systemctl-legacy-tools-polkit
systemctl: fix various aspects of polkit authorization in legacy tools.
2015-09-10 19:53:31 +02:00
Daniel Mack
f70e152ec6 Merge pull request #1222 from poettering/image-ops-settings
machine: when removing, renaming, cloning images also care for .nspaw…
2015-09-10 19:18:18 +02:00
Daniel Mack
a18f3caa56 Merge pull request #1239 from poettering/cgroup-pids
core: add support for the "pids" cgroup controller
2015-09-10 19:11:29 +02:00
Daniel Mack
786c5bf957 Merge pull request #1242 from poettering/no-off_t
Drop usage of off_t
2015-09-10 19:01:25 +02:00
Lennart Poettering
03a7b521e3 core: add support for the "pids" cgroup controller
This adds support for the new "pids" cgroup controller of 4.3 kernels.
It allows accounting the number of tasks in a cgroup and enforcing
limits on it.

This adds two new setting TasksAccounting= and TasksMax= to each unit,
as well as a gloabl option DefaultTasksAccounting=.

This also updated "cgtop" to optionally make use of the new
kernel-provided accounting.

systemctl has been updated to show the number of tasks for each service
if it is available.

This patch also adds correct support for undoing memory limits for units
using a MemoryLimit=infinity syntax. We do the same for TasksMax= now
and hence keep things in sync here.
2015-09-10 18:41:06 +02:00
Lennart Poettering
e11d45682e update TODO 2015-09-10 18:18:58 +02:00
Lennart Poettering
59f448cf15 tree-wide: never use the off_t unless glibc makes us use it
off_t is a really weird type as it is usually 64bit these days (at least
in sane programs), but could theoretically be 32bit. We don't support
off_t as 32bit builds though, but still constantly deal with safely
converting from off_t to other types and back for no point.

Hence, never use the type anymore. Always use uint64_t instead. This has
various benefits, including that we can expose these values directly as
D-Bus properties, and also that the values parse the same in all cases.
2015-09-10 18:16:18 +02:00
Lennart Poettering
15af581253 Merge pull request #1236 from evverx/systemctl-requisite-of
systemctl: add RequisiteOf* as inverses of Requisite and RequisiteOverridable
2015-09-10 16:40:04 +02:00
Lennart Poettering
78e28c98e9 Merge pull request #1238 from again4you/devel/fix_smack_mtab
smack: label /etc/mtab as "_" when '--with-smack-run-label' is enabled.
2015-09-10 16:36:07 +02:00
Sangjung Woo
1fab0cbafc smack: label /etc/mtab as "_" when '--with-smack-run-label' is enabled.
/etc/mtab should be labeled as "_", even though systemd has its own
smack label using '--with-smack-run-label' configuration. This is mainly
because all processes could read that file and the origin of this file
(i.e. /proc/mounts) is labeled as "_". This labels /etc/mtab as "_" when
'--with-smack-run-label' is enabled.
2015-09-10 21:52:39 +09:00
Evgeny Vereshchagin
1143adf722 systemctl: add RequisiteOf* as inverses of Requisite and RequisiteOverridable 2015-09-10 14:49:29 +03:00
Daniel Mack
f33be31198 Merge pull request #1226 from poettering/coccinelle-fixes3
Third round of Coccinelle fixes
2015-09-10 13:46:14 +02:00
Ivan Shapovalov
58158dc765 systemctl: improve clarity of error messages in the logind path 2015-09-10 14:45:00 +03:00
Ivan Shapovalov
2ac3930f5b systemctl: relax permission checks in halt_main()
Thus we allow (non-interactive) polkit auth to kick in for legacy commands
(halt, poweroff, reboot, telinit) as well.

Fixes (another aspect of) issue #213.
2015-09-10 14:45:00 +03:00
Ivan Shapovalov
a9085ea356 systemctl: fix logind bus call error handling in halt_main()
Handle -EOPNOTSUPP and -EINPROGRESS like in start_special().
2015-09-10 14:44:59 +03:00
Ivan Shapovalov
4c315c2c7c systemctl: minor: use IN_SET() instead of repeated equality checks. 2015-09-10 14:39:46 +03:00
Lennart Poettering
89921f6ed0 Merge pull request #1234 from medhefgo/master
cryptsetup-generator: Properly check return code
2015-09-10 12:10:44 +02:00
Jan Janssen
c802a7306b cryptsetup-generator: Properly check return code 2015-09-10 10:23:49 +02:00
Martin Pitt
0018e4e479 Merge pull request #1230 from swem/master
Add microphone mute keymap for Dell Precision
2015-09-10 06:56:44 +02:00
Chen-Han Hsiao (Stanley)
6e675e278c Add microphone mute keymap for Dell Precision 2015-09-10 11:30:57 +08:00
Ivan Shapovalov
16f017fa6e systemctl: legacy tools shall never be interactive
Fixes (the main concern of) issue #213.
2015-09-10 01:14:07 +03:00
Lennart Poettering
f24aa148ab Merge pull request #1225 from mbiebl/remove-sphinx-leftover2
README: remove obsolete instructions regarding python-systemd/sphinx
2015-09-09 23:13:58 +02:00
Lennart Poettering
525d3cc746 tree-wide: take benefit of the fact that hashmap_free() returns NULL
And set_free() too.

Another Coccinelle patch.
2015-09-09 23:12:07 +02:00
Michael Biebl
45096d27d3 README: remove obsolete instructions regarding python-systemd/sphinx 2015-09-09 23:10:34 +02:00
Lennart Poettering
6796073e33 tree-wide: make use of the fact that strv_free() returns NULL
Another Coccinelle patch.
2015-09-09 23:05:58 +02:00
Lennart Poettering
1d1423257a Makefile: fix gardel target 2015-09-09 23:05:46 +02:00
Lennart Poettering
8e0b657094 machine: when removing, renaming, cloning images also care for .nspawn settings file
Whenever we remove/rename/clone a machine image, make sure we do the
same for the image's .nspawn settings file.
2015-09-09 18:51:23 +02:00
Lennart Poettering
c6312fb3cf Merge pull request #1220 from zonque/logind-dry-run
logind: make dry run command line arguments work again (v2)
2015-09-09 18:39:01 +02:00
Daniel Mack
7681f5b889 systemctl: add dry-run support for scheduled shutdowns
Prefix the action parameter with "dry-" in case the --dry-run command
line switch was passed.
2015-09-09 17:52:12 +02:00
Daniel Mack
1389f4b958 logind: allow dry run variants for scheduled shutdowns
Allow passing a "dry-" prefix to the action parameter passed to
.ScheduleShutdown(). When strings with this prefix are passed,
the scheduled action will not take place. Instead, an info message
is logged.
2015-09-09 17:52:11 +02:00
Lennart Poettering
c36d25218b Merge pull request #1213 from evverx/systemd-notify-log
notify: log error when sd_pid_notify() == 0
2015-09-09 15:54:41 +02:00
Daniel Mack
01da201420 Merge pull request #1218 from poettering/safe-fclose
util: introduce safe_fclose() and port everything over to it
2015-09-09 15:45:03 +02:00
Daniel Mack
37b76fd3ee README: document new /etc/mtab requirement 2015-09-09 15:27:56 +02:00