summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2012-06-22unit: drop the Names= optionLennart Poettering
Names= is a source of errors, simply because alias names specified like this only become relevant after a unit has been loaded but cannot be used to load a unit. Let's get rid of the confusion and drop this field. To establish alias names peope should use symlinks, which have the the benefit of being useful as key to load a unit, even though they are not taken into account if unit names are listed but they haven't been explicitly referenced before.
2012-06-22dbus: don't expose SysVInitPath and SysVRcndPath on the busLennart Poettering
People should use systemd.pc if anything at all to determine these directories, and people should not assume that the bus fields are part of the supported API, so let's just drop this.
2012-06-22core: remove sysv_console optionLennart Poettering
This option never made much sense. It was originally intended to make sure that the usual startup output of sysv scripts goes to the terminal. However, since SysV scripts started from a terminal would not output to that terminal, but rather /dev/console this effect was more often than not actually taking place. Nowadays systemd has much nicer boot time status output than SysV which makes the sysv output redundant. Finally, all output of services goes to the journal anyway, and is not lost. Hence, let's drop this option, and simplify things a bit.
2012-06-22systemctl: automatically turn paths and unescaped unit names into proper ↵Lennart Poettering
unit names This makes sure that systemctl status /home is implicitly translated to: systemctl status /home.mount Similar, /dev/foobar becomes dev-foobar.device. Also, all characters that cannot be part of a unit name are implicitly escaped.
2012-06-22cryptsetup: allow configuration of LUKS disks via the kernel cmdlineLennart Poettering
This generalizes a bit of the functionality already available in dracut.
2012-06-22man: document all kernel command line options we understandLennart Poettering
2012-06-22journal: set the _SYSTEMD_UNIT field for messages from terminated processesEelco Dolstra
As described in https://bugs.freedesktop.org/show_bug.cgi?id=50184 the journal currently doesn't set fields such as _SYSTEMD_UNIT properly for messages coming from processes that have already terminated. This means among other things that "systemctl status" may not show some of the output of services that wrote messages just before they exited. This patch fixes this by having processes that log to the journal write their unit identifier to journald when the connection to /run/systemd/journal/stdout is opened. Journald stores the unit ID and uses it to fill in _SYSTEMD_UNIT when it cannot be obtained normally (i.e. from the cgroup). To prevent impersonating another unit, this information is only used when the caller is root. This doesn't fix the general problem of getting metadata about messages from terminated processes (which requires some kernel support), but it allows "systemctl status" and similar queries to do the Right Thing for units that log via stdout/stderr.
2012-06-21rpm: include RPM macro definition for .spec snippetsLennart Poettering
Let's try to standardize a bit the RPM macros used for installing/uninstalling services. This only covers the non-SysV compat bits, since that tends to vary widely between the various distros. Usage: Add %{?systemd_requires} to the header of the spec file. And then: %post %systemd_post foobar.service %preun %systemd_preun foobar.service %postun %systemd_postun foobar.service And, instead of the latter, in case the service shall be restarted on updates: %postun %systemd_postun_restart foobar.service
2012-06-19systemd: return error when asked to stop unknown unitMichal Sekletar
Command systemctl stop foo.service, will print error message, when foo.service is unknown to systemd, i.e. there is no unit file loaded for this service. https://bugzilla.redhat.com/show_bug.cgi?id=732874
2012-06-15service: timeout for oneshot servicesLukas Nykryn
Add possibility to specify timeout for oneshot services. [ https://bugzilla.redhat.com/show_bug.cgi?id=761656 Added minor fixups. -- michich ]
2012-06-13unit-name: introduce unit_dbus_path_from_name()Michal Schmidt
Use the same function in core and in systemctl. get_unit_path() in systemctl becomes unnecessary.
2012-06-04silence gcc warning on 32 bitKay Sievers
2012-06-04remove support for deprecated /proc/self/oom_adjKay Sievers
2012-06-01missing: define MS_STRICTATIME if not defined alreadyLennart Poettering
2012-06-01journal: allow setting of a cutoff log level for disk storage, syslog, kmsg, ↵Lennart Poettering
console forwarding
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-05-31main: allow setting of timer slack for PID 1Lennart Poettering
2012-05-31util: introduce a proper nsec_t and make use of it where appropriateLennart Poettering
2012-05-30shutdown: Don't skip bind mounts on shutdownDaniel Drake
This reverts commits d72238fcb34abc81aca97c5fb15888708ee937d3 and f3accc08. OLPC runs / as a bind-mount, so this must be remounted RO during shutdown to avoid corruption. As Lennert can't recall the exact reasons for making the shutdown code skip bind mounts, revert to previous behaviour to solve the issue for OLPC. http://lists.freedesktop.org/archives/systemd-devel/2012-April/004957.html
2012-05-30dbus: better don't expose options we better shouldn't exposedLennart Poettering
NotifySocket= is hardly useful, people should use $NOTIFY_SOCKET if anything. RunningAs= suggests people had a choice of running user mode as PID 1 or vice versa, so remove this too.
2012-05-30service: mark compat options as suchLennart Poettering
This moves FsckPassNo= and SysVStartPriority= into its own "Compatibility Options" section in the man page to clarify that these options are not useful for anything but establishing a limited amount of compatibility. Also stop exposing these options on the bus.
2012-05-29capabilities: when dropping capabilities system-wide also drop them from ↵Lennart Poettering
usermode helpers This hooks things up with /proc/sys/kernel/usermodehelper/bset and /proc/sys/kernel/usermodehelper/inheritable.
2012-05-24swap: avoid bad memory accesssystemd/v183Lennart Poettering
2012-05-24main: add configuration option to alter capability bounding set for PID 1Lennart Poettering
This also ensures that caps dropped from the bounding set are also dropped from the inheritable set, to be extra-secure. Usually that should change very little though as the inheritable set is empty for all our uses anyway.
2012-05-24service: for Type=idle units consider START_PRE, START, START_POST all as ACTIVELennart Poettering
We want to avoid a deadlock when a service has ExecStartPre= programs that wait for the job queue to run empty because of Type=idle, but which themselves keep the queue non-empty because START_PRE was considered ACTIVATING and hence the job not complete. With this patch we alter the state translation table so that it is impossible ever to wait for Type=idle unit, hence removing the deadlock.
2012-05-23man: properly document FsckPassNo= for mount unitsLennart Poettering
2012-05-23manager: rework generator logicLennart Poettering
Previously generated units were always placed at the end of the search path. With this change there will be three unit dirs instead of one, to place generated entries at the beginning, in the middle and at the end of the search path: beginning: for units that need to override all configuration, regardless of user or vendor. Example use: system-update-generator uses this to temporarily redirect default.target. middle: for units that need to override vendor configuration, but not vendor configuration. Example use: /etc/fstab should override vendor supplied configuration (think /tmp), but should not override native user configuration. end: does not override anything but is available as well. Possible usage might be to convert D-Bus bus service files to native units but allowing vendor supplied native units to win.
2012-05-22units: remove service sysv_path variable and replace it by generic unit_pathLennart Poettering
UnitPath= is also writable via native units and may be used by generators to clarify from which file a unit is generated. This patch also hooks up the cryptsetup and fstab generators to set UnitPath= accordingly.
2012-05-22mount: drop unused functionLennart Poettering
2012-05-22execute: use a much lower idle timeout that default timeLennart Poettering
The idle timeout after all is for cosmetics only, hence avoid any substantial delays just for it.
2012-05-22mount: replace PID1 internal fstab parser with generatorLennart Poettering
Bit by bit we should remove non-unit parsing from PID 1 and move into generators, to clean up our code base a bit and clearly separate parsers.
2012-05-22main: only fall back to /bin/sh in case /sbin/init does not existKay Sievers
2012-05-22switch-root: do not use close old_root_fd after rm_rf_children()Harald Hoyer
rm_rf_children() has already closed the fd with closedir().
2012-05-22main: properly queue default.target after switched rootLennart Poettering
This also introduces rd.systemd.unit= to specify the unit to boot into in the initrd.
2012-05-22mount: use the same fstab extension option syntax everywhereLennart Poettering
The man page and the actual code differed, and this is now corrected
2012-05-22service: fix auto-restart handling in service_start()David Ward
Do not bypass the SERVICE_DEAD/SERVICE_FAILED state by manually issuing a start job while an automatic restart is pending.
2012-05-22service: fix auto-restart handling in service_stop()David Ward
When service_stop() handles a service in the SERVICE_AUTO_RESTART state, it calls service_set_state() to transition it to the SERVICE_DEAD state. However if the service failed, it should transition it to SERVICE_FAILED instead, which will trigger its OnFailure units. To achieve this, we now call service_enter_dead() in place of service_set_state(), which will transition the service to either SERVICE_DEAD or SERVICE_FAILED as is appropriate. Also, some misleading comments are adjusted: service_stop() is not only called on a user request, but also during an automatic restart in order to handle dependencies. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45511
2012-05-22service: actually delay auto-restart if another job is pendingDavid Ward
https://bugs.freedesktop.org/show_bug.cgi?id=45511
2012-05-21main: allow system wide limits for servicesFrederic Crozat
2012-05-21main: rename a few fix to follow general naming styleLennart Poettering
2012-05-21switch-root: move switch_root() call into its own .c fileLennart Poettering
2012-05-21main: do_switch_root() do not recursively remove across device boundariesHarald Hoyer
2012-05-21core/main.c: handle the initrd timestamp differently, if in the initrdHarald Hoyer
If systemd is in the initrd/initramfs, set the initrd timestamp and do not try to read it from the RD_TIMESTAMP environment variable.
2012-05-21core/main.c: do_switch_root(): do not remove the old root if not in initrdHarald Hoyer
Only recursively remove the old root, if we have been in an initrd/initramfs.
2012-05-21core/main.c: add "--switchedroot" parameterHarald Hoyer
If systemd serializes from a switch_root, it adds "--switchedroot" to the systemd in the real root. If "--switchedroot" is found, then we do not skip all the stuff, which is skipped for normal rexecs.
2012-05-21manager: only serialize the timestamps for the initramfs if in_initrd()Harald Hoyer
2012-05-21main: corrected do_switch_root()Harald Hoyer
do_switch_root now mount moves "/dev", "/proc", "/sys", "/run" and removes the old root recursively.
2012-05-21sd-pam: Drop uid so parent signal arrives at child.Auke Kok
The PAM helper thread needs to capture the death signal from the parent, but is prohibited from doing so since when the child dies as normal user, the kernel won't allow it to send a TERM to the PAM helper thread which is running as root. This causes the PAM threads to never exit, accumulating after user sessions exit. There is however really no need to keep the PAM threads running as root, so, we can just setresuid() to the same user as defined in the unit file for the parent thread (User=). This makes the TERM signal arrive as normal. In case setresuid() fails, we ignore the error, so we at least fall back to the current behaviour.
2012-05-21main: try a bit harder to find an init process to execute after ↵Lennart Poettering
reexec/switch-root
2012-05-21service: make the fsck pass no configurableLennart Poettering