summaryrefslogtreecommitdiff
path: root/src/core/main.c
Commit message (Collapse)AuthorAge
...
* strv: multiple cleanupsSimon Peeters2014-01-05
| | | | | | | | | | - turn strv_merge into strv_extend_strv. appending strv b to the end of strv a instead of creating a new strv - strv_append: remove in favor of strv_extend and strv_push. - strv_remove: write slightly more elegant - strv_remove_prefix: remove unused function - strv_overlap: use strv_contains - strv_printf: STRV_FOREACH handles NULL correctly
* Use format patterns for usec_t, pid_t, nsec_t, usec_tZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | | | | It is nicer to predefine patterns using configure time check instead of using casts everywhere. Since we do not need to use any flags, include "%" in the format instead of excluding it like PRI* macros.
* log: als turn on debug logging in non-PID1 if /proc/cmdline contains "debug"Lennart Poettering2013-12-23
|
* do not run kmod-setup in a containerKay Sievers2013-12-19
|
* core: in a container log to /dev/console if "debug" is specifiedLennart Poettering2013-12-18
|
* log: don't reopen /dev/console each time we call log_open()Lennart Poettering2013-12-18
| | | | Instead, force reopen it only if we really really have to.
* _noreturn_ --> noreturn for C11 compatShawn Landden2013-12-17
| | | | also define noreturn w/o <stdnoreturn.h>
* core: allocate a kdbus bus for each systemd instance, if we canLennart Poettering2013-11-30
|
* tree-wide usage of %m specifier instead of strerror(errno)Daniel Buch2013-11-26
| | | | | | Also for log_error() except where a specific error is specified e.g. errno ? strerror(errno) : "Some user specified message"
* shutdown: during final killing spree also send SIGHUP in addition to SIGTERM ↵Lennart Poettering2013-11-25
| | | | | | to deal with shells This makes shutdown a bit faster if debug-shell.service is enabled.
* conf-parser: distinguish between multiple sections with the same nameTom Gundersen2013-11-25
| | | | | | | | | | | | | | | | | | | | | | | Pass on the line on which a section was decleared to the parsers, so they can distinguish between multiple sections (if they chose to). Currently no parsers take advantage of this, but a follow-up patch will do that to distinguish [Address] Address=192.168.0.1/24 Label=one [Address] Address=192.168.0.2/24 Label=two from [Address] Address=192.168.0.1/24 Label=one Address=192.168.0.2/24 Label=two
* valgrind: make running PID 1 in valgrind usefulLennart Poettering2013-11-20
| | | | | Since valgrind only generates useful output on exit() (rather than exec()) we need to explicitly exit when valgrind is detected.
* core: convert PID 1 to libsystemd-busLennart Poettering2013-11-20
| | | | | | | | | | | | | | | | | | | | | | This patch converts PID 1 to libsystemd-bus and thus drops the dependency on libdbus. The only remaining code using libdbus is a test case that validates our bus marshalling against libdbus' marshalling, and this dependency can be turned off. This patch also adds a couple of things to libsystem-bus, that are necessary to make the port work: - Synthesizing of "Disconnected" messages when bus connections are severed. - Support for attaching multiple vtables for the same interface on the same path. This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus calls which used an inappropriate signature. As a side effect we will now generate PropertiesChanged messages which carry property contents, rather than just invalidation information.
* analyze: plot the time spent setting up security modulesThomas Hindoe Paaboel Andersen2013-11-10
|
* manager: configurable StartLimit default valuesLukas Nykryn2013-11-08
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=821723
* core: fix require $XDG_RUNTIME_DIRKay Sievers2013-11-07
| | | | | | | $ sudo dracut -f Trying to run as user instance, but $XDG_RUNTIME_DIR is not set. /usr/lib/dracut/modules.d/98systemd/module-setup.sh: line 10: ((: >= 198 : syntax error: operand expected (error token is ">= 198 ")
* udevadm-settle: add missing braceZbigniew Jędrzejewski-Szmek2013-11-07
|
* core: require $XDG_RUNTIME_DIR to be set for user instancesMantas Mikulėnas2013-11-07
| | | | It seems that some places use /run otherwise, which isn't going to work.
* util: unify reading of /proc/cmdlineLennart Poettering2013-11-06
| | | | | | Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
* Configurable Timeouts/Restarts default valuesOleksii Shevchuk2013-11-05
| | | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=71132 Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec configuration options to manager configuration file.
* bus: remove static introspection file exportKay Sievers2013-10-21
|
* main: don't free fds array twiceLennart Poettering2013-10-01
|
* main: set umask before creating any filesMike Gilbert2013-09-26
| | | | | | This avoids a problem when we inherit a non-zero umask from the initramfs. This would cause /run/systemd to be created with the wrong mode.
* main: drop capabilities of userhelpers before oursHarald Hoyer2013-08-30
| | | | | | | | 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
* log to kmsg when "debug" is used on the kernel command lineKay Sievers2013-08-27
|
* do not pass-along the environment from the kernel or initrdKay Sievers2013-07-30
|
* rework systemd's own process environment handling/passingKay Sievers2013-07-26
| | | | | | | | | | | | | Stop importing non-sensical kernel-exported variables. All parameters in the kernel command line are exported to the initial environment of PID1, but suppressed if they are recognized by kernel built-in code. The EFI booted kernel will add further kernel-internal things which do not belong into userspace. The passed original environ data of the process is not touched and preserved across re-execution, to allow external reading of /proc/self/environ for process properties like container*=.
* remove left-over initrd time stamp handlingKay Sievers2013-07-23
|
* remove RD_TIMESTAMP importHarald Hoyer2013-07-17
| | | | | If you want timing information from the initramfs, use systemd in the initramfs.
* core: rearrange if blocks a bitLennart Poettering2013-07-11
|
* core: uninstall cgroup agent only if we are running outside of a containerLennart Poettering2013-07-10
| | | | | Since the cgroupfs is currently not virtualized for containers we shouldn't reset the hosts agent from the container.
* core: send out "Reloading" signal before and after doing a full ↵Lennart Poettering2013-07-10
| | | | | | | | | | | | | | reload/reexec of PID 1 Since we'll unload all units/job during a reload, and then readd them it is really useful for clients to be aware of this phase hence sent a signal out before and after. This signal is called "Reloading" (despite the fact that it is also sent out during reexecution, which we consider a special case in this context) and has one boolean parameter which is true for the signal sent before the reload, and false for the signal after the reload. The UnitRemoved/JobRremoved and UnitNew/JobNew due to the reloading are guranteed to be between the pair of Reloading messages.
* core: serialize/deserialize bus subscribersLennart Poettering2013-07-10
|
* suppress status message output at shutdown when 'quiet' is givenKay Sievers2013-07-05
|
* disable the cgroups release agent when shutting downKay Sievers2013-07-04
| | | | | | | | | | During shutdown, when we try to clean up all remaining processes, the kernel will fork new agents every time a cgroup runs empty. These new processes cause delays in the final SIGTERM, SIGKILL logic. Apart from that, this should also avoid that the kernel-forked binaries cause unpredictably timed access to the filesystem which we might need to unmount.
* man: improve grammar and word formatting in numerous man pagesJason St. John2013-07-02
| | | | | | | | | | Use proper grammar, word usage, adjective hyphenation, commas, capitalization, spelling, etc. To improve readability, some run-on sentences or sentence fragments were revised. [zj: remove the space from 'file name', 'host name', and 'time zone'.]
* main: fix loading of default targetLennart Poettering2013-06-28
|
* core: add transient unitsLennart Poettering2013-06-28
| | | | | | | | | | | | | | | | | | Transient units can be created via the bus API. They are configured via the method call parameters rather than on-disk files. They are subject to normal GC. Transient units currently may only be created for services (however, we will extend this), and currently only ExecStart= and the cgroup parameters can be configured (also to be extended). Transient units require a unique name, that previously had no configuration file on disk. A tool systemd-run is added that makes use of this functionality to run arbitrary command lines as transient services: $ systemd-run /bin/ping www.heise.de Will cause systemd to create a new transient service and run ping in it.
* core: general cgroup reworkLennart Poettering2013-06-27
| | | | | | | | | | | | | | | | Replace the very generic cgroup hookup with a much simpler one. With this change only the high-level cgroup settings remain, the ability to set arbitrary cgroup attributes is removed, so is support for adding units to arbitrary cgroup controllers or setting arbitrary paths for them (especially paths that are different for the various controllers). This also introduces a new -.slice root slice, that is the parent of system.slice and friends. This enables easy admin configuration of root-level cgrouo properties. This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in /dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is turned off by DevicePolicy=).
* core: don't do runaway fork()s if we hit a segfault from our segfault handlerLennart Poettering2013-06-27
|
* manager: add DefaultEnvironment optionUmut Tezduyar2013-06-20
| | | | | | | This complements existing functionality of setting variables through 'systemctl set-environment', the kernel command line, and through normal environment variables for systemd in session mode.
* manager: Do not handle SIGKILL since we can notChengwei Yang2013-06-06
| | | | | | | | | | | | | | | | | | | | | | | This is a minor fix because it's not a major issue, this fix just avoid to get EINVAL error from sigaction(2). There are two signals can not handled at user space, SIGKILL and SIGSTOP even we're PID 1, trying to handle these two signals will get EINVAL error. There are two kinds of systemd instance, running as system manager or user session manager, apparently, the latter is a general user space process which can not handle SIGKILL. The special pid 1 also can not do that refer to kernel/signal.c:do_sigaction(). However, pid 1 is unkillable because the kernel did attach SIGNAL_UNKILLABLE to it at system boot up, refer to init/main.c:start_kernel() --> rest_init() --> kernel_thread() --> kernel_init() --> init_post() current->signal->flags |= SIGNAL_UNKILLABLE
* core: read "debug" from kernel commandline and set log levelLukas Nykryn2013-05-30
|
* systemd: record efi timestamps after /sys is mountedZachary Cook2013-05-29
| | | | | | | | | | | | | This partially reverts commit c3a170f3, which moved efi_get_boot_timestamps too early in main(), before /sys is assured to be mounted Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64371 [tomegun: in particular /sys/firmware/efi/efivars needs to be mounted, which is not a problem if a systemd-initramfs containing the correct module is being used. But not everyone uses an initramfs...]
* systemd-sleep: add support for freeze and standbyZbigniew Jędrzejewski-Szmek2013-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | A new config file /etc/systemd/sleep.conf is added. It is parsed by systemd-sleep and logind. The strings written to /sys/power/disk and /sys/power/state can be configured. This allows people to use different modes of suspend on systems with broken or special hardware. Configuration is shared between systemd-sleep and logind to enable logind to answer the question "can the system be put to sleep" as correctly as possible without actually invoking the action. If the user configured systemd-sleep to only use 'freeze', but current kernel does not support it, logind will properly report that the system cannot be put to sleep. https://bugs.freedesktop.org/show_bug.cgi?id=57793 https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e73c5ae6e7991a6c01f6d096ff8afaef4458c36 http://lists.freedesktop.org/archives/systemd-devel/2013-February/009238.html SYSTEM_CONFIG_FILE and USER_CONFIG_FILE defines were removed since they were used in only a few places and with the addition of /etc/systemd/sleep.conf it becomes easier to just append the name of each file to the dir name.
* systemd: record the timestamps as early as possibleHarald Hoyer2013-04-25
| | | | | | | | | | | | | | | The time for systemd initialization and selinux policy loading is accounted to the initrd or the kernel, which is wrong. Instead of: Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) + 975ms (initrd) + 1.410s (userspace) = 8.647s the more correct output is: Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) + 475ms (initrd) + 1.910s (userspace) = 8.647s
* conf-parser: restrict .include usageLennart Poettering2013-04-25
| | | | | Disallow recursive .include, and make it unavailable in anything but unit files.
* Small cleanupZbigniew Jędrzejewski-Szmek2013-04-24
|
* core: there's no point to complain so loudly about non-isolatable boot targetsLennart Poettering2013-04-22
|
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html