summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2012-07-17execute: support syscall filtering using seccomp filtersLennart Poettering
2012-07-16core: fix name of dbus call parameterLennart Poettering
2012-07-16unit: set default working directory to the user's home directory when ↵Lennart Poettering
running in user mode
2012-07-16unit: introduce %s specifier for the user shellLennart Poettering
2012-07-16unit: printf specifiers %u and %h: $USER and $HOME.Auke Kok
These printf specifiers allow us to refer to $HOME and $USER in unit files. These are particularly helpful in instanced units that have "User=" set, and in systemd --user domains. The specifiers will return the pw_name and pw_dir fields if the unit file has a User= field. If the unit file does not have a User= field, the value substituted is either $USER or $HOME from the environment, or, if unset, the values from pw_name or pw_dir. This patch is somewhat after Ran Benita's original patch, which didn't get merged. I've split up the 2 specifiers and extended them to do what is logically expected from these specifiers. Note that expansion is done at `start` time, not after the units are parsed. Using `systemctl show` will just show the specifiers.
2012-07-16Spelling fixes.Ville Skyttä
2012-07-15unit: avoid re-definition of enum for older gcc versionsKay Sievers
<koen> | ./src/shared/unit-name.h:29:23: error: redefinition of typedef 'UnitType' <koen> | ./src/core/unit.h:30:23: note: previous declaration of 'UnitType' was here
2012-07-13unit: rename BindTo= to BindsTo=Lennart Poettering
all other dependencies are in 3rd person. Change BindTo= accordingly to BindsTo=. Of course, the dependency is widely used, hence we parse the old name too for compatibility.
2012-07-13shutdown: add missing includeLennart Poettering
2012-07-13main: only reopen /dev/console if we switch-root to a custom initHarald Hoyer
There's no point in reopening /dev/console if we reopen it anyway afterwards.
2012-07-13container: when shutting down in a container don't detach loop devicesLennart Poettering
We don't do device handling in containers, hence no loop devices either.
2012-07-13core: go on a killing spree when transitioning from initrd to main systemLennart Poettering
2012-07-13util: rename join() to strjoin()Lennart Poettering
This is to match strappend() and the other string related functions.
2012-07-10selinux: turn of libselinux' internal loggingLennart Poettering
2012-07-10switch-root: reopen /dev/console before we switch rootLennart Poettering
2012-07-10mount: fix for complex automountsMalte Starostik
If accessing an automount point triggers more changes to /proc/self/mountinfo than just to add the directly wanted mount, these changes can lead to spurious -ENODEV notifications on the automount unit causing the request to fail when in fact the mount will be setup right afterwards.
2012-07-10unit: Move UnitLoadState definitions from core/unit.c to shared/unit-name.cZbigniew Jędrzejewski-Szmek
This makes it possible to use them from systemctl without linking against the core.
2012-07-10unit: get rid of UnitVTable.suffix, which is now unusedLennart Poettering
2012-07-10unit-name: remove unit_name_is_valid_no_type() and move unit_name_is_valid() ↵Lennart Poettering
to unit-name.h
2012-07-10unit: Move UnitType definitions from core/unit.c to shared/unit-name.cZbigniew Jędrzejewski-Szmek
This makes it possible to use them from systemctl without linking against the core. A string->enum lookup table is added.
2012-07-09MeeGo: Remove build support for MeeGo distribution.Auke Kok
The MeeGo distribution is still a supported distribution, but will probably not see an updated version of systemd anymore. Most of the development is focussing on Tizen now, and the generic support for building --with-distro=other is more than adequate enough. This patch removes the support as a custom configuration build target in systemd. People who are still building this for the MeeGo distribution should build as "other" distro.
2012-07-04service: flush the start counter in "systemctl reset-failed"Lennart Poettering
2012-07-03mount-setup: don't complain if we try to fix the label of a dir beneath a ↵Lennart Poettering
mount but can't due to EROFS
2012-07-03load-fragment: a few modernizationsLennart Poettering
2012-07-02core: mention if we are run from an initial RAM diskLennart Poettering
2012-07-02manager: turn notify socket into abstract namespace socket againLennart Poettering
sd_notify() should work for daemons that chroot() as part of their initilization, hence it's a good idea to use an abstract namespace socket which is not affected by chroot.
2012-06-29manager: serialize/deserialize job counters across reexec/reloadLennart Poettering
2012-06-29remount-fs: also remount /usr according to fstabLennart Poettering
2012-06-29mount: load only if we there's mountinfo or fragmentMichal Schmidt
Having information from /proc/self/mountinfo is sufficient to consider a mount unit loaded. When there's no mountinfo, the loading of the fragment for the mount unit is not optional. No extra dependency links must be added when the loading fails. https://bugzilla.redhat.com/show_bug.cgi?id=835848
2012-06-29mount: split adding of extras from mount_load()Michal Schmidt
2012-06-28main: print detected virtualiaztion at bootLennart Poettering
2012-06-28modules-load: use correct va_list logging functionMichal Schmidt
2012-06-26core: make systemd.confirm_spawn=1 actually workLennart Poettering
This adds a timeout if the TTY cannot be acquired and makes sure we always output the question to the console, never to the TTY of the respective service.
2012-06-26service: pass via FAILED/DEAD before going to AUTO_RESTARTMichal Schmidt
With misconfigured mysql, which uses Restart=always, the following two messages would loop indefinitely and the "systemctl start" would never finish: Job pending for unit, delaying automatic restart. mysqld.service holdoff time over, scheduling restart. In service_enter_dead() always set the state to SERVICE_FAILED/DEAD first before setting SERVICE_AUTO_RESTART. This is to allow running jobs to complete. OnFailure will be also triggered at this point, so there's no need to do it again from service_stop() (where it was added in commit f0c7b229). Note that OnFailure units should better trigger only after giving up auto-restarting, but that's for another patch to solve. https://bugzilla.redhat.com/show_bug.cgi?id=832039
2012-06-26service: fix incorrect argumentMichal Schmidt
The last argument to service_enter_dead() is bool allow_restart, not a service result.
2012-06-26bus: drop HaveWatchdog optionLennart Poettering
Clients should always watch /dev/watchdog directly, instead of going indirect. Let's keep our stacks small.
2012-06-25cryptsetup: fix escaping when generating cryptsetup unitsLennart Poettering
2012-06-25units: rename fsck@.service to systemd-fsck@.serviceLennart Poettering
The rule is that units that encapsulate our own code are prefixed with "systemd-". Since the fsck units invoke our own code, hence add the missing prefix. Since a long long time the fsck units didn't invoke the naked fsck binaries anymore, and it is unlikely that this well ever change. On the opposite: the code in systemd-fsck will probably get more complex over time to handle fsck progress to plymouth forwarding. Same for quotacheck (but not quotaon!)
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