summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* core/dbus: properly export cgroup properties on socketsZbigniew Jędrzejewski-Szmek2013-06-19
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=65945
* core: unref slice ref after useLennart Poettering2013-06-18
|
* core: expose a "Slice" property on Unit objects on the busLennart Poettering2013-06-18
|
* core: add new .slice unit type for partitioning systemsLennart Poettering2013-06-17
| | | | | | | | | | | | In order to prepare for the kernel cgroup rework, let's introduce a new unit type to systemd, the "slice". Slices can be arranged in a tree and are useful to partition resources freely and hierarchally by the user. Each service unit can now be assigned to one of these slices, and later on login users and machines may too. Slices translate pretty directly to the cgroup hierarchy, and the various objects can be assigned to any of the slices in the tree.
* mount: when learning about the root mount from mountinfo, don't add ↵Lennart Poettering2013-06-17
| | | | | | conflicting dep for umount.target That way systemd won't try to umount it at shutdown.
* rpm: define a %_userunitdir macroLennart Poettering2013-06-17
|
* Use stdint.h macros instead of casts to print uint64_t valuesZbigniew Jędrzejewski-Szmek2013-06-10
| | | | Casts are visually heavy, and can obscure unwanted truncations.
* service: don't report alien child as alive when it's notRoss Lagerwall2013-06-09
| | | | | | | | | | When a sigchld is received from an alien child, main_pid is set to 0 then service_enter_running calls main_pid_good to check if the child is running. This incorrectly returned true because kill(main_pid, 0) would return >= 0. This fixes an error where a service would die and the cgroup would become empty but the service would still report as active (running).
* service: execute ExecStopPost= commands when the watchdog timeout hitsLennart Poettering2013-06-06
| | | | | | | | We can assume that a service for which a watchdog timeout was triggered is unresponsive to a clean shutdown. However, it still makes sense to execute the post-stop cleanup commands that can be configured with ExecStopPost=. Hence, when the timeout is hit enter STOP_SIGKILL rather than FINAL_SIGKILL.
* 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
* analyze: show unit file loading on plotThomas Hindoe Paaboel Andersen2013-06-02
| | | | | | This will add another color to the legend called "Loading unit files" Like the generators it will mark a part of the systemd bar indicating the time spent while loading unit files.
* analyze: show generators on plotUmut Tezduyar2013-06-02
|
* systemctl: suggest 'systemctl daemon-reload' without --systemZbigniew Jędrzejewski-Szmek2013-05-30
| | | | | --system is default anyway, and some poor user might type 9 characters without needing to.
* systemctl: add commands set-default and get-defaultVáclav Pavlín2013-05-30
| | | | | systemctl set-default NAME links the default.target to the given unit, get-default prints out the path to the currently set default target.
* core: read "debug" from kernel commandline and set log levelLukas Nykryn2013-05-30
|
* core: use the same test as upstart for apparmorNirbheek Chauhan2013-05-30
| | | | | | | | | | | | | | | | Lennart: > Hmm, I just noticed this patch: > > https://code.launchpad.net/~mdeslaur/upstart/apparmor-support/+merge/164169 > > It contains a different check for AppArmor. Basically something like this: > > /sys/module/apparmor/parameters/enabled == 'Y' > > I'd prefer if we could change our code to do the same, given that > the Ubuntu guys are guys are upstream for apparmor. https://bugs.freedesktop.org/show_bug.cgi?id=63312
* Fix CPUShares configuration optionEelco Dolstra2013-05-30
| | | | | This fixes the error message "Unknown or unsupported cgroup attribute CPUShares".
* 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...]
* service: kill processes with SIGKILL on watchdog failureMichael Olbrich2013-05-21
| | | | | | | | | | Just calling service_enter_dead() does not kill any processes. As a result, the old process may still be running when the new one is started. After a watchdog failure the service is in an undefined state. Using the normal shutdown mechanism makes no sense. Instead all processes are just killed and the service can try to restart.
* core: fix DBus property ExecMainExitTimestampMichal Schmidt2013-05-20
| | | | | Possibly due to copy&paste error it was identical to ExecMainStartTimestamp.
* Make it possible to disable smack separately from xattr supportKarol Lewandowski2013-05-17
| | | | Additionally, compile out rule loading if feature is disabled.
* Add support for ConditionSecurity=imaAuke Kok2013-05-11
| | | | | | | | | | Just as with SMACK, we don't really know if a policy has been loaded or not, as the policy interface is write-only. Assume therefore that if ima is present in securityfs that it is enabled. Update the man page to reflect that "ima" is a valid option now as well.
* Re-indent with spaces.Auke Kok2013-05-11
|
* Start ctrl-alt-del.target irreversiblyEelco Dolstra2013-05-09
| | | | | This makes ctrl-alt-del reboots more robust, just like "systemctl reboot".
* condition, man: Add support for ConditionSecurity=smackKarol Lewandowski2013-05-08
| | | | | | | | According to Documentation/security/Smack.txt: In keeping with the intent of Smack, configuration data is minimal and not strictly required. The most important configuration step is mounting the smackfs pseudo filesystem. This means that checking the mount point should be enough.
* Rearrange a few fields to reduce holesZbigniew Jędrzejewski-Szmek2013-05-08
|
* hostname: only suppress setting of pretty hostname if it is non-equal to the ↵Lennart Poettering2013-05-07
| | | | | | static hostname and if the static hostname is set, too https://bugzilla.redhat.com/show_bug.cgi?id=957814
* build-sys: support builds without EAs againLennart Poettering2013-05-07
|
* kmod-setup: properly iterate through module tableLennart Poettering2013-05-07
| | | | | | Previously we skipped every second entry. This also cleans up much of the code and removes some dead code.
* core: escape unit name from udevMUNEDA Takahiro2013-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | This patch escapes a unit name which was derived from udev. Please imagine following udev rule. ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%p.service" ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%r.service" ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%S.service" When unit name is derived from udev via udev_device_get_property_value(), the name may contains '/' if ENV{SYSTEMD_WANTS} has the udev options $devpath(%p), $root(%r), or $sys(%S). However, '/' is a invalid char for unit name so processing of this rule fails as Invalid argument with following message. Apr 22 13:21:37 localhost systemd[1]: Failed to load device unit: Invalid argument Apr 22 13:21:37 localhost systemd[1]: Failed to process udev device event: Invalid argument This patch escapes those invalid chars in a unit name. Tested with 202, and confirmed to apply cleanly on top of commit 195f8e36. Thanks, Takahiro
* 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.
* core: unit_inactive_or_pending() should actually do as it claimsLennart Poettering2013-05-06
|
* condition, man: Add support for ConditionSecurity=apparmorNirbheek Chauhan2013-05-06
| | | | | | | Checking for the apparmor directory in securityfs means the apparmor module is loaded and enabled, and hence should suffice as a test. https://bugs.freedesktop.org/show_bug.cgi?id=63312
* core: bump simultaneous bus connection limit to 512Lennart Poettering2013-05-03
|
* Add __attribute__((const, pure, format)) in various placesZbigniew Jędrzejewski-Szmek2013-05-02
| | | | | | | | I'm assuming that it's fine if a _const_ or _pure_ function calls assert. It is assumed that the assert won't trigger, and even if it does, it can only trigger on the first call with a given set of parameters, and we don't care if the compiler moves the order of calls.
* dbus-execute: fix introspectionRonny Chevalier2013-05-01
| | | | | Add missing property and remove duplicate properties already in src/core/dbus-kill.h
* cgroup: do not allow manipulating the cgroup path of units within the ↵Lennart Poettering2013-04-30
| | | | systemd:/system subtree
* id128: when taking user input for a 128bit ID, validate syntaxLennart Poettering2013-04-30
| | | | Also, always accept both our simple hexdump syntax and UUID syntax.
* man: clarify what Restart= meansZbigniew Jędrzejewski-Szmek2013-04-29
| | | | Related to https://bugzilla.redhat.com/show_bug.cgi?id=957135.
* dbus-manager.c: log error, why switch-root is refusedHarald Hoyer2013-04-26
|
* core: remove duplicate MESSAGE= from log messageMirco Tischler2013-04-25
| | | | | This was needed with log_struct_unit() but log_notice_unit() adds it anyway.
* Add some extra __attribute__ ((format)) sCristian Rodríguez2013-04-25
|
* unit: rework stop pending logicLennart Poettering2013-04-25
| | | | | | | | | | | When a trigger unit wants to know if a stop is queued for it, we should just check precisely that and do not check whether it is actually stopped already. This is because we use these checks usually from state change calls where the state variables are not updated yet. This change splits unit_pending_inactive() into two calls unit_inactive_or_pending() and unit_stop_pending(). The former checks state and pending jobs, the latter only pending jobs.
* 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.
* cgroup: always validate cgroup controller namesLennart Poettering2013-04-24
| | | | Let's better be safe than sorry.
* logind: don't busy loop if a job is still running but the delay timeout expiresLennart Poettering2013-04-24
|
* Small cleanupZbigniew Jędrzejewski-Szmek2013-04-24
|
* Add set_consume which always takes ownershipZbigniew Jędrzejewski-Szmek2013-04-24
| | | | Freeing in error path is the common pattern with set_put().
* Standarize on one spelling of symlink error messageZbigniew Jędrzejewski-Szmek2013-04-24
| | | | | It's polite to print the name of the link that wasn't created, and it makes little sense to print the target.