1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

134 Commits

Author SHA1 Message Date
William Douglas
9e7c53579a systemd: Add systemd.setenv for /proc/cmdline parsing.
Check for systemd.setenv when parsing /proc/cmdline.
ex: systemd.setenv=PATH=/opt/bin
2012-02-08 16:33:55 +01:00
Lennart Poettering
2c6db6fb9b main: use a shorter default $PATH if /usr is merged 2012-02-07 15:56:28 +01:00
Michal Schmidt
bacbccb78c manager: tell correctly if the manager is booting
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-02 13:39:15 +01:00
Lennart Poettering
5d6b158473 exec: include path name of binary we are about to execute when renaming 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-02-01 22:33:15 +01:00
Michal Schmidt
512947d46f main: don't force text mode in console_setup()
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-29 21:55:51 +01:00
Michal Schmidt
ac155bb885 unit: remove union Unit
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-16 13:34:42 +01:00
Lennart Poettering
4cfa2c999d core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
Lennart Poettering
509b6efbbe main: fix spelling 2012-01-07 01:26:08 +01:00
Lennart Poettering
706343f492 journal: introduce log target 'journal' for executed processes 2012-01-06 02:48:38 +01:00
Lennart Poettering
b52aae1d93 util: move virtualization detection into its own files, and extend return codes 2011-09-23 17:00:33 +02:00
Lennart Poettering
27d340c772 fsck: show progress while fscking at boot 2011-09-01 21:05:06 +02:00
Lennart Poettering
de6c78f879 service: change default stdout/stderr to syslog 2011-08-30 22:57:58 +02:00
Lennart Poettering
0c85a4f3ef cgroup: optionally mount a specific cgroup controllers together, and add cpu+cpuacct to the default 2011-08-23 00:37:35 +02:00
Lennart Poettering
7aaa27f219 main: fix reexec 2011-08-01 22:42:19 +02:00
Lennart Poettering
f975e971ac load-fragment: speed up parsing by using a perfect hash table with configuration settings built by gperf 2011-08-01 00:43:05 +02:00
Lennart Poettering
07672f492e main: show load profiling in test mode, too 2011-07-31 18:13:59 +02:00
Lennart Poettering
0b3325e79e selinux: use setcon() instead of reexec to apply selinux policy 2011-07-28 23:52:23 +02:00
Lennart Poettering
058dc6f379 main: redirection to telinit is unnecessary if sysv compat is disabled 2011-07-28 23:42:47 +02:00
Lennart Poettering
9d76d730ef main: profile unit file loading 2011-07-28 23:41:57 +02:00
Lennart Poettering
871e580949 selinux: log how much time it takes to load the SELinux policy and database 2011-07-25 21:22:57 +02:00
Kay Sievers
ff4daf5a34 fix hwclock_apply_localtime_delta() to properly handle negative TZ offset
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-21 20:28:27 +02:00
Kay Sievers
2376ce132b clarify separate-/usr message
Everything should be fine if /usr is mounted from initramfs.
2011-07-11 02:12:42 +02:00
Lennart Poettering
a755605296 manager: merge serialization and desrialization counter into one, and 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-06 00:47:42 +02:00
Lennart Poettering
eeecf6e607 log: log to syslog unless connected to a tty in user mode 2011-07-01 22:35:34 +02:00
Lennart Poettering
9a0e689634 util: try harder to rename the process 2011-06-30 04:16:10 +02:00
Lennart Poettering
2076cf8831 timedated: sync clock down to RTC where necessary 2011-06-21 19:29:45 +02:00
Michal Vyskocil
f8e08a77e7 main: Fix a typo emergency shall->emergency shell 2011-06-20 17:48:58 +02:00
Kay Sievers
7948c4dfbe rtc in localtime: use settimeofday(NULL, tz) instead of hwclock(8)
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-24 20:23:07 +02:00
Lennart Poettering
6ea832a207 exec: hangup/reset/deallocate VTs in gettys
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-05-18 01:07:36 +02:00
Lennart Poettering
6faa11140b status: show status messages unconditionally if plymouth is around 2011-03-30 02:21:48 +02:00
Lennart Poettering
871c44a747 taint: add missing cgroups taint flag 2011-03-30 02:12:46 +02:00
Lennart Poettering
3731f1eaa8 conf-parser: fix remaining parser functions according to new prototype 2011-03-28 23:04:30 +02:00
Kay Sievers
2b583ce657 use /run instead of /dev/.run
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-28 23:00:00 +02:00
Lennart Poettering
f6a6225e41 def: centralize definition of default timeout in one place 2011-03-17 04:02:35 +01:00
Jan Engelhardt
bba6cb45a5 main: revert recognition of "b" argument
Commit 099663ff8c 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-16 03:53:13 +01:00
Lennart Poettering
d821e6d69a main: interpret all argv[] arguments unconditionally when run in a container 2011-03-16 03:41:49 +01:00
Lennart Poettering
6ef1b05339 main: parse the whole arv[] as kernel command line 2011-03-16 02:56:30 +01:00
Lennart Poettering
90df7e567f main: log to the console in a container 2011-03-14 15:37:02 +01:00
Lennart Poettering
b770165a4f main: don't parse /proc/cmdline in containers 2011-03-14 04:08:12 +01:00
Lennart Poettering
7d640cdf66 units: move the last flag files to /dev/.run 2011-03-11 01:06:53 +01:00
Lennart Poettering
099663ff8c main: properly handle -b boot option 2011-03-11 00:52:31 +01:00
Lennart Poettering
fe783b0341 main: refuse system to be started in a chroot 2011-03-09 23:59:27 +01:00
Lennart Poettering
b0c8757b05 main: don't check if /usr really is a mount point, since it is fine if it is passed pre-mounted to us from the initrd 2011-03-09 23:59:07 +01:00
Lennart Poettering
b925e72633 dev: use /dev/.run/systemd as runtime directory, instead of /dev/.systemd 2011-03-09 22:45:47 +01:00
Lennart Poettering
d7ccca2e3f main: introduce /etc/machine-id
This is supposed to play the same roles /var/lib/dbus/machine-id,
however fixes a couple of problems:

- It is available during early boot since it is stored in /etc

- Removes the ID from the D-Bus context and moves it into a system
  context, thus hopefully lowering hesitation by people to use it.

- It is generated at installation time. If the file is empty at boot
  time it will be mounted over with a randomly generated ID, which is
  not saved to disk. This is useful to support state-less machines with
  no transient or writable /etc configuration.
2011-03-04 21:53:19 +01:00
Lennart Poettering
81ab0d3c65 main: minor optimization 2011-03-04 19:48:12 +01:00
Lennart Poettering
aa1671320d main: add link to wiki page with longer explanation of the /usr madness 2011-03-04 05:07:01 +01:00
Lennart Poettering
ed1c99fcc1 s/seperate/separate/ 2011-03-04 03:58:52 +01:00
Harald Hoyer
35b8ca3aaf Spelling Corrections
Just some lame spelling corrections with no functionality.
2011-02-28 22:47:38 +01:00
Lennart Poettering
80758717a6 main: print warning if /usr is on a seperate partition 2011-02-23 01:10:20 +01:00