summaryrefslogtreecommitdiff
path: root/src/main.c
AgeCommit message (Collapse)Author
2012-04-12rename machine-id-main.c tomacht the binary and move main.c to core/Kay Sievers
2012-04-12main: pass original environment block to shutdown binary so that it can ↵Lennart Poettering
detect container environments
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2012-04-11main: disarm watchdog when preparing for reexecutionLennart Poettering
2012-04-11main: unset some bash specific environment variables that might get leaked to usLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=811537
2012-04-11main: drop container/initrd env vars from inherited setLennart Poettering
Leave the env vars used in the container/initrd logic set for PID1, but don't inherit them to any children.
2012-04-11main: add URL to cgroups check messageLennart Poettering
2012-04-05systemd: add hardware watchdog supportLennart Poettering
This adds minimal hardware watchdog support to PID 1. The idea is that PID 1 supervises and watchdogs system services, while the hardware watchdog is used to supervise PID 1. This adds two hardware watchdog configuration options, for the runtime watchdog and for a shutdown watchdog. The former is active during normal operation, the latter only at reboots to ensure that if a clean reboot times out we reboot nonetheless. If the runtime watchdog is enabled PID 1 will automatically wake up at half the configured interval and write to the watchdog daemon. By default we enable the shutdown watchdog, but leave the runtime watchdog disabled in order not to break independent hardware watchdog daemons people might be using. This is only the most basic hookup. If necessary we can later on hook up the watchdog ping more closely with services deemed crucial.
2012-03-22main: added support for loading IMA custom policiesRoberto Sassu
This is an S/MIME signed message The new function ima_setup() loads an IMA custom policy from a file in the default location '/etc/ima/ima-policy', if present, and writes it to the path 'ima/policy' in the security filesystem. This function is executed at early stage in order to avoid that some file operations are not measured by IMA and it is placed after the initialization of SELinux because IMA needs the latter (or other security modules) to understand LSM-specific rules. This feature is enabled by default and can be disabled by providing the option '--disable-ima' to the configure script. Signed-off-by: Roberto Sassu <roberto.sassu@polito.it> Acked-by: Gianluca Ramunno <ramunno@polito.it>
2012-02-08systemd: Add systemd.setenv for /proc/cmdline parsing.William Douglas
Check for systemd.setenv when parsing /proc/cmdline. ex: systemd.setenv=PATH=/opt/bin
2012-02-07main: use a shorter default $PATH if /usr is mergedLennart Poettering
2012-02-02manager: tell correctly if the manager is bootingMichal Schmidt
The assumption that the initial job is the job with id==1 is incorrect. Some jobs may be enqueued before the job that starts the default unit as in this example: -.mount changed dead -> mounted Trying to enqueue job quotacheck.service/start/fail Installed new job quotacheck.service/start as 1 Installed new job systemd-stdout-syslog-bridge.socket/start as 2 Enqueued job quotacheck.service/start as 1 Trying to enqueue job quotaon.service/start/fail Installed new job quotaon.service/start as 5 Enqueued job quotaon.service/start as 5 Activating default unit: default.target Trying to enqueue job graphical.target/start/replace This fixes a bug where displaying of boot status messages was turned off too early.
2012-02-01exec: include path name of binary we are about to execute when renaming ↵Lennart Poettering
forked off processes Immediately after forking off a process change the comm name and argv[0] to "(foobar)" where "foobar" is the basename of the path we are about to execute. This should be useful when charting boot progress.
2012-01-29main: don't force text mode in console_setup()Michal Schmidt
When systemd starts, plymouth may be already displaying progress graphically. Do not switch the console to text mode at that time. All other users of reset_terminal_fd() do the switch as before. This avoids a graphical glitch with plymouth, especially visible with vesafb, but could be also seen as a sub-second blink with radeon. https://bugzilla.redhat.com/show_bug.cgi?id=785548
2012-01-16unit: remove union UnitMichal Schmidt
Now that objects of all unit types are allocated the exact amount of memory they need, the Unit union has lost its purpose. Remove it. "Unit" is a more natural name for the base unit class than "Meta", so rename Meta to Unit. Access to members of the base class gets simplified.
2012-01-12core: switch all log targets to go directly to the journal, instead via syslogLennart Poettering
2012-01-07main: fix spellingLennart Poettering
2012-01-06journal: introduce log target 'journal' for executed processesLennart Poettering
2011-09-23util: move virtualization detection into its own files, and extend return codesLennart Poettering
2011-09-01fsck: show progress while fscking at bootLennart Poettering
2011-08-30service: change default stdout/stderr to syslogLennart Poettering
2011-08-23cgroup: optionally mount a specific cgroup controllers together, and add ↵Lennart Poettering
cpu+cpuacct to the default
2011-08-01main: fix reexecLennart Poettering
2011-08-01load-fragment: speed up parsing by using a perfect hash table with ↵Lennart Poettering
configuration settings built by gperf
2011-07-31main: show load profiling in test mode, tooLennart Poettering
2011-07-28selinux: use setcon() instead of reexec to apply selinux policyLennart Poettering
2011-07-28main: redirection to telinit is unnecessary if sysv compat is disabledLennart Poettering
2011-07-28main: profile unit file loadingLennart Poettering
2011-07-25selinux: log how much time it takes to load the SELinux policy and databaseLennart Poettering
2011-07-21fix hwclock_apply_localtime_delta() to properly handle negative TZ offsetKay Sievers
Localtime may be a negative number, i.e. GMT-7. Fix based on a patch from Kelly Anderson <kelly@silka.with-linux.com>.
2011-07-11clarify separate-/usr messageKay Sievers
Everything should be fine if /usr is mounted from initramfs.
2011-07-06manager: merge serialization and desrialization counter into one, and ↵Lennart Poettering
increase it when reexecuting Instead of having individual counters n_serializing and n_deserializing have a single one n_reloading, which should be sufficient. Set n_reloading when we are about to go down for reexecution to avoid cgroup trimming when we free the units for reexecution.
2011-07-01log: log to syslog unless connected to a tty in user modeLennart Poettering
2011-06-30util: try harder to rename the processLennart Poettering
2011-06-21timedated: sync clock down to RTC where necessaryLennart Poettering
2011-06-20main: Fix a typo emergency shall->emergency shellMichal Vyskocil
2011-05-24rtc in localtime: use settimeofday(NULL, tz) instead of hwclock(8)Kay Sievers
We check for LOCAL in /etc/adjtime and if needed, ask the kernel to apply the timezone delta to the system clock. The very first call of settimeofday() without a time, but a timezone warps the system clock, so that it properly runs in UTC.
2011-05-18exec: hangup/reset/deallocate VTs in gettysLennart Poettering
Explicitly disconnect all clients from a VT when a getty starts/finishes (requires TIOCVHANGUP, available in 2.6.29). Explicitly deallocate getty VTs in order to flush scrollback buffer. Explicitly reset terminals to a defined state before spawning getty.
2011-03-30status: show status messages unconditionally if plymouth is aroundLennart Poettering
2011-03-30taint: add missing cgroups taint flagLennart Poettering
2011-03-28conf-parser: fix remaining parser functions according to new prototypeLennart Poettering
2011-03-28use /run instead of /dev/.runKay Sievers
Instead of the /dev/.run trick we have currently implemented, we decided to move the early-boot runtime dir to /run. An existing /var/run directory is bind-mounted to /run. If /var/run is already a symlink, no action is taken. An existing /var/lock directory is bind-mounted to /run/lock. If /var/lock is already a symlink, no action is taken. To implement the directory vs. symlink logic, we have a: ConditionPathIsDirectory= now, which is used in the mount units. Skipped mount unit in case of symlink: $ systemctl status var-run.mount var-run.mount - Runtime Directory Loaded: loaded (/lib/systemd/system/var-run.mount) Active: inactive (dead) start condition failed at Fri, 25 Mar 2011 04:51:41 +0100; 6min ago Where: /var/run What: /run CGroup: name=systemd:/system/var-run.mount The systemd rpm needs to make sure to add something like: %pre mkdir -p -m0755 /run >/dev/null 2>&1 || : or it needs to be added to filesystem.rpm. Udev -git already uses /run if that exists, and is writable at bootup. Otherwise it falls back to the current /dev/.udev. Dracut and plymouth need to be adopted to switch from /dev/.run to run too. Cheers, Kay
2011-03-17def: centralize definition of default timeout in one placeLennart Poettering
2011-03-16main: revert recognition of "b" argumentJan Engelhardt
Commit 099663ff8c117303af369a4d412dafed0c5614c2 added "b" as a recognized argument, however, B is not a runlevel like S. (B appears as a pseudo runlevel in openSUSE's init.d scripts only for the sake of insserv being able to manage /etc/init.d/boot.d like the other dirs).
2011-03-16main: interpret all argv[] arguments unconditionally when run in a containerLennart Poettering
2011-03-16main: parse the whole arv[] as kernel command lineLennart Poettering
2011-03-14main: log to the console in a containerLennart Poettering
2011-03-14main: don't parse /proc/cmdline in containersLennart Poettering
2011-03-11units: move the last flag files to /dev/.runLennart Poettering
2011-03-11main: properly handle -b boot optionLennart Poettering