summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2014-07-07service: don't accept negative ERRNO= notification messagesLennart Poettering
2014-07-07service: minor modernizationLennart Poettering
2014-07-07core: Added support for ERRNO NOTIFY_SOCKET message parsing, and added ↵Miguel Angel Ajo
StatusErrno dbus property along StatusText to allow notification of numeric status condition while degraded service operation or any other special situation.
2014-07-07firstboot: add new component to query basic system settings on first boot, ↵Lennart Poettering
or when creating OS images offline A new tool "systemd-firstboot" can be used either interactively on boot, where it will query basic locale, timezone, hostname, root password information and set it. Or it can be used non-interactively from the command line when prepareing disk images for booting. When used non-inertactively the tool can either copy settings from the host, or take settings on the command line. $ systemd-firstboot --root=/path/to/my/new/root --copy-locale --copy-root-password --hostname=waldi The tool will be automatically invoked (interactively) now on first boot if /etc is found unpopulated. This also creates the infrastructure for generators to be notified via an environment variable whether they are running on the first boot, or not.
2014-07-07main: explain our /etc empty check a bit in a commentLennart Poettering
2014-07-04main: change check whether /etc is unpopulated to look for /etc/machine-idLennart Poettering
Previously, we checked whether /etc was completely empty. This makes it difficult though for container managers such as nspawn to install a small number of files (such as /etc/timezone), and have the system otherwise populate its own tree. Hence, change this by looking for /etc/machine-id, which should be a good sign whether /etc is populated or not.
2014-07-03machinectl: show /etc/os-release information of container in status outputLennart Poettering
2014-07-03namespace: make sure /tmp, /var/tmp and /dev are writable in namespaces we ↵Lennart Poettering
set up
2014-07-03namespace: fix uninitialized memory accessLennart Poettering
2014-07-03core: introduce exit_status_set_is_empty() to make things a bit easier to readLennart Poettering
2014-07-03exit-status: rename ExitStatusSet's "code" field to "status"Lennart Poettering
We should follow the naming scheme waitid() uses, not come up with our own reversed one...
2014-07-03core: introduce new RestartForceExitStatus= service settingLennart Poettering
This does the inverse of RestartPreventExitStatus=: it forces a restart of a service when a certain exit status is returned by a service process.
2014-06-30cryptsetup: allow x-systemd.device-timeoutZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=54210
2014-06-30Move x-systemd-device.timeout handling from core to fstab-generatorZbigniew Jędrzejewski-Szmek
Instead of adjusting job timeouts in the core, let fstab-generator write out a dropin snippet with the appropriate JobTimeout. x-systemd-device.timeout option is removed from Options= line in the generated unit. The functions to write dropins are moved from core/unit.c to shared/dropin.c, to make them available outside of core. generator.c is moved to libsystemd-label, because it now uses functions defined in dropin.c, which are in libsystemd-label.
2014-06-30pc: no longer expose exec_prefix in .pc fileLennart Poettering
There's little reason to export this, so let's drop it to minimize the file a bit.
2014-06-30pc: expose more drop-in dirs in the .pc fileLennart Poettering
2014-06-30pc: export $libdir in the .pc fileLennart Poettering
This is useful for code that tries to figure out the primary arch's $libdir on the local system, given that is different on the various Linuxes.
2014-06-28doc: grammatical correctionsJan Engelhardt
2014-06-27main: uid_to_name() might fail due to OOM, protect against thatLennart Poettering
2014-06-26timer: name the stamp file consistentlyMichał Bartoszkiewicz
The stamp file for systemd --user timers was named stamp-foo.timer if XDG_DATA_HOME was unset, but foo.timer otherwise.
2014-06-26core/transaction: fix cycle break attempts outside transactionUoti Urpala
Patch fixes some incorrect-looking code in transaction.c. It could fix cases where Debian users with bad package configurations had systemd go into an infinite loop printing messages about breaking an ordering cycle, though I have not reproduced that problem myself. transaction_verify_order_one() considers jobs/units outside current transaction when checking whether ordering dependencies cause cycles. It would also incorrectly try to break cycles at these jobs; this cannot work, as the break action is to remove the job from the transaction, which is a no-op if the job isn't part of the transaction to begin with. The unit_matters_to_anchor() test also looks like it would not work correctly for non-transaction jobs. Add a check to verify that the unit is part of the transaction before considering a job a candidate for deletion. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752259
2014-06-26core: Don't require cgroups xattr supportTom Hirst
Failure to mount cgroups with xattr should not be fatal
2014-06-26core: use correct format string for UIDsMichał Bartoszkiewicz
2014-06-26shutdown: rework messages during shutdownZbigniew Jędrzejewski-Szmek
When running in 'quiet' mode, the only message printed from shutdown binary would be 'Cannot finalize remaining file systems and devices, giving up.', the only log line at error level before switch back to initramfs. This is misleading, because in initramfs everything will be cleaned up properly. Avoid printing anything at error level before the attempt to switch back to initramfs. Rework the messages to contain a bit more information what is still remaining, to help people diagnose shutdown issues.
2014-06-24use more _cleanup_ macroRonny Chevalier
2014-06-24switch-root: create essential base directories at system bootupKay Sievers
This allows us to bootup a rootfs with a /usr directory only.
2014-06-24nspawn: create essential base directories at system bootupKay Sievers
This allows us to bootup a rootfs with a /usr directory only.
2014-06-23core: You can not put the cached result of use_smack fct, as we are not sure ↵Ronan Le Martret
the "/sys" is mounted. So we should mount "sys" before "/proc" https://bugs.freedesktop.org/show_bug.cgi?id=77646
2014-06-23core: make sure Environment fields passed in for transient units are ↵Hristo Venev
properly written to unit files https://bugs.freedesktop.org/show_bug.cgi?id=76744
2014-06-22core/snapshot: log info when snapshots are created and removedZbigniew Jędrzejewski-Szmek
Snapshot mechanism is not used very much, but snapshot creation/destruction should be at least as verbose as normal unit starting/stopping.
2014-06-22core/transaction: avoid misleading error message when unit not foundZbigniew Jędrzejewski-Szmek
There's no point in telling the user to look at the logs when an attempt to load the unit file failed with ENOENT. https://bugzilla.redhat.com/show_bug.cgi?id=996133
2014-06-22core/transaction: reindent and split very long linesZbigniew Jędrzejewski-Szmek
2014-06-20core: clean-up signal reset logic when reexecLennart Poettering
There's no need to save the old sigmask, if we are going to die. Let's simplify this. Also, reset all the signal handlers, so that we don't leave SIG_IGN set for some of them across reexec.
2014-06-19main: don't show help text anymore when we detect an unknown kernel cmdline ↵Lennart Poettering
value starting with "systemd." As generators and other components started to maintain their own kernel command line options this help text needed more and more exceptions and wasn't complete anyway. Fixing that would leak more information about specific generators into PID 1, which we should avoid. Given that kernel cmdline handling traditionally doesn't generate errors or show help texts, let's just remove the logic for it for systemd too.
2014-06-19main: honour rd.systemd.unit= only in the initrd, not the hostLennart Poettering
2014-06-18socket: check return from exec_spawnThomas Hindoe Paaboel Andersen
2014-06-18namespace: properly label device nodes we createLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=1081429
2014-06-17core: populate unit file set with preset data if we boot with empty /etcLennart Poettering
2014-06-17machine-id-setup: allow passing NULL as function argument, for simplicityLennart Poettering
2014-06-17kmod: conditionalize kmod setup on CAP_SYS_MODULE, not whether we run in a ↵Lennart Poettering
container It's generally preferrable to conditionalize on the actual ability to do something then the context we run in.
2014-06-17log: don't downgrade log level in non-PID 1 if "quiet" is passed on kernel ↵Lennart Poettering
cmdline "debug" should apply to all tools, but "quiet" only to PID1.
2014-06-17install: introduce new DefaultInstance= field for [Install] sectionsLennart Poettering
The DefaultInstance= name is used when enabling template units when only specifying the template name, but no instance. Add DefaultInstance=tty1 to getty@.service, so that when the template itself is enabled an instance for tty1 is created. This is useful so that we "systemctl preset-all" can work properly, because we can operate on getty@.service after finding it, and the right instance is created.
2014-06-17install: beef up preset logic to limit to only enable or only disable, and ↵Lennart Poettering
do all-unit preset operations The new "systemctl preset-all" command may now be used to put all installed units back into the enable/disable state the vendor/admin encoded in preset files. Also, introduce "systemctl --preset-mode=enable-only" and "systemctl --preset-mode=disable-only" to only apply the enable or only the disable operations of a "systemctl preset" or "systemctl preset-all" operation. "systemctl preset-all" implements this RFE: https://bugzilla.redhat.com/show_bug.cgi?id=630174
2014-06-16Reset signal-mask on re-exec to init=..Ruediger Oertel
Process 1 (aka init) needs to be started with an empty signal mask. That includes the process 1 that's started after the initrd is finished. When the initrd is using systemd (as it does with dracut based initrds) then it is systemd that calls the real init. Normally this is systemd again, except when the user uses for instance "init=/bin/bash" on the kernel command line.
2014-06-16mount: add new SloppyOptions= setting for mount units, mapping to mount(8)'s ↵Lennart Poettering
"-s" switch
2014-06-16mount: tell /bin/mount to never touch /etc/mtabLennart Poettering
/etc/mtab should die die die. It's sad enough util-linux still contains support for it, but we don't have to partake in that charade, so let's turn this off. This is in-line with the fact that since years we already have been "tainting" systemd if we detect /etc/mtab not being a symlink... Of course, util-linux is currently broken, and still touches /etc/mtab, weven if we pass "--no-mtab" to it: https://bugzilla.redhat.com/show_bug.cgi?id=1109367 But hey, let's hope that gets fixed quickly, even if total removal of /etc/mtab support from util-linux might not happen so quickly...
2014-06-13core: don't complain at early boot if /etc/mtab is not the right symlinkLennart Poettering
When we boot up with an empty /etc it's ok if the symlink doesn't exist. We will create it later with tmpfiles.
2014-06-13os-release: define /usr/lib/os-release as fallback for /etc/os-releaseLennart Poettering
The file should have been in /usr/lib/ in the first place, since it describes the OS container in /usr (and not the configuration in /etc), hence, let's support os-release files in /usr/lib as fallback if no version in /etc exists, following the usual override logic. A prior commit already enabled tmpfiles to create /etc/os-release as a symlink to /usr/lib/os-release should it be missing, thus providing nice compatibility with applications only checking in /etc. While it's probably a good idea if all apps check both locations via a fallback logic, it is only necessary in the early boot process, as long as the /etc/os-release symlink has not been restored, in case we boot with an empty /etc.
2014-06-13rpm: add RPM macros to apply sysusers, sysctl, and binfmt drop-insLennart Poettering
With this in place RPMs can make sure that whatever they drop in is immeidately applied, and not delayed until next reboot. This also moves systemd-sysusers back to /usr/bin, since hardcoding the path to /usr/lib in the macros would mean compatibility breaks in future, should we turn sysusers into a command that is actually OK for people to call directly. And given that that is quite likely to happen (since it is useful to prepare images with its --root= switch), let's just prepare for it.
2014-06-13rpm: don't hardcode the binary paths in the macros, rely on $PATHLennart Poettering
this gives us a little bit more freedom to move things around later on, as we don't hardcode the systemd paths in old RPMs that shall work with new systemds.