1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
Commit Graph

8288 Commits

Author SHA1 Message Date
Lennart Poettering
e056b01d8a service: for Type=idle units consider START_PRE, START, START_POST all as ACTIVE
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-24 02:22:35 +02:00
Lennart Poettering
d5c446c95a update TODO 2012-05-23 12:52:39 +02:00
Lennart Poettering
659635ab22 units: fix file syntax 2012-05-23 12:49:49 +02:00
Lennart Poettering
1afd5be42f journal: don't complain if SELinux userspace is available but the kernel lacks it 2012-05-23 12:49:41 +02:00
Lennart Poettering
66b1a24790 man: properly document FsckPassNo= for mount units 2012-05-23 04:11:29 +02:00
Lennart Poettering
8d59c9b490 readahead: use Conflicts= instead of masking to get rid of readahead units 2012-05-23 04:02:56 +02:00
Lennart Poettering
7b63bde1ed update TODO 2012-05-23 03:51:55 +02:00
Lennart Poettering
db5eea5a79 readahead: disable collect/replay during system updates 2012-05-23 03:51:48 +02:00
Lennart Poettering
08231e5142 readahead: avoid running of readahead services if readahead is already done 2012-05-23 03:51:25 +02:00
Lennart Poettering
e905f48fdc readahead: avoid activating the journal by accident, log directly to kmsg 2012-05-23 03:50:53 +02:00
Lennart Poettering
1897573598 readahead: when doing a system update drop readahead file 2012-05-23 03:50:15 +02:00
Lennart Poettering
07719a21b6 manager: rework generator logic
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-23 03:43:29 +02:00
Lennart Poettering
7c4c5f68a5 update TODO 2012-05-22 23:11:21 +02:00
Lennart Poettering
1b64d026af units: remove service sysv_path variable and replace it by generic unit_path
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-22 23:08:24 +02:00
Lennart Poettering
a690306153 log: make sure generators never log into the journal to avoid activation deadlocks
This makes all generators log to kmsg by default.
2012-05-22 22:00:37 +02:00
Lennart Poettering
399c5f9633 mount: drop unused function 2012-05-22 19:50:10 +02:00
Lennart Poettering
d360705f0f system-update: add system update generator
http://freedesktop.org/wiki/Software/systemd/SystemUpdates
2012-05-22 19:48:51 +02:00
Lennart Poettering
5ad661b6b0 journal: log journal internal messages to kmsg 2012-05-22 19:26:51 +02:00
Lennart Poettering
e6a2674500 execute: use a much lower idle timeout that default time
The idle timeout after all is for cosmetics only, hence avoid any
substantial delays just for it.
2012-05-22 19:26:15 +02:00
Lennart Poettering
6b1dc2bd3c mount: replace PID1 internal fstab parser with generator
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-22 19:25:17 +02:00
Kay Sievers
745e2fb79a main: only fall back to /bin/sh in case /sbin/init does not exist 2012-05-22 19:17:40 +02:00
Harald Hoyer
898720b7e9 test: introduce a basic testsuite framework
$ cd test
$ sudo make check

will run all tests in the TEST-* subdirectories

$ cd test/TEST-01-BASIC
$ sudo make clean setup run

will run the different stages of the test for debugging purposes
2012-05-22 16:54:54 +02:00
Lennart Poettering
9b958eff3f logind: fix write out of user state file 2012-05-22 16:46:11 +02:00
Harald Hoyer
b46178e5c2 switch-root: do not use close old_root_fd after rm_rf_children()
rm_rf_children() has already closed the fd with closedir().
2012-05-22 16:15:09 +02:00
Lennart Poettering
7925c22a78 util: make sure to fstatat() at most once in rm_rf_children() 2012-05-22 16:14:34 +02:00
Lennart Poettering
49e7f02774 rescue: don't pull in sockets
In rescue mode let's not establish all sockets, so that we don't end up
starting a lot of additional services automatically.

Instead of pulling in basic.target we now only pull in sysinit.target
which pulls in local-fs.target and swap.target. That way rescue mode has
all the really basic setup around, but normal services are not started
and not autostarted either.
2012-05-22 16:12:25 +02:00
Sjoerd Simons
499fb2152f journal: crash when filesystem is low on space
When space is getting too low on a file system rotating the journal file
will fail after the rotation, as opening the new logfile will fail.

Recognize this when logging the error and don't try to dereference a
NULL JournalFile pointer.
2012-05-22 13:22:00 +02:00
Lennart Poettering
bf4df7c3b6 main: properly queue default.target after switched root
This also introduces rd.systemd.unit= to specify the unit to boot into
in the initrd.
2012-05-22 13:22:00 +02:00
Kay Sievers
9a203affa6 build-sys: use libpci's pkgconfig file to find the pci.ids file 2012-05-22 02:35:44 +02:00
Maxim A. Mikityanskiy
0b270320da keymap: support for Lenovo IdeaPad Z570 keyboard 2012-05-22 02:11:21 +02:00
Lennart Poettering
92a39ae198 mount: use the same fstab extension option syntax everywhere
The man page and the actual code differed, and this is now corrected
2012-05-22 02:00:53 +02:00
David Ward
2e9d6c1251 service: fix auto-restart handling in service_start()
Do not bypass the SERVICE_DEAD/SERVICE_FAILED state by manually issuing
a start job while an automatic restart is pending.
2012-05-22 01:57:21 +02:00
David Ward
f0c7b229e1 service: fix auto-restart handling in service_stop()
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-22 01:55:52 +02:00
David Ward
feae8adb84 service: actually delay auto-restart if another job is pending
https://bugs.freedesktop.org/show_bug.cgi?id=45511
2012-05-22 01:53:30 +02:00
Lennart Poettering
30edf11616 cgtop: change default depth to 3
https://bugs.freedesktop.org/show_bug.cgi?id=49778
2012-05-22 01:48:40 +02:00
Guillermo Vidal
fec2aa2f9e Fixed handling of posix_fallocate() returned value
According to the man pages of posix_fallocate, it returns zero on
success or an error number on failure; however,  errno is not set
on failure. If the kernel or a library other than glibc does not
support the function for example, EOPNOTSUPP will be returned and
the error will not be handled properly with original code.
2012-05-22 01:45:11 +02:00
Shawn Landden
927735238d systemd-analyze: switch to python getopt for argument parsing
this uses gnu style getopt, so you can put the opts at the end: (e.g.)
systemd-analyze blame --user

v4
2012-05-22 01:34:19 +02:00
Lennart Poettering
33ba4c4b0e man: relax wording in journal-fields(7) a bit 2012-05-22 01:12:46 +02:00
Frederic Crozat
c93ff2e913 main: allow system wide limits for services 2012-05-21 21:13:27 +02:00
Michal Schmidt
401cc72da8 journald: one more SYSLOG_IDENTIFIER length fix 2012-05-21 20:21:49 +02:00
Michal Schmidt
fca1b90a0d journald: fix length of "SYSLOG_IDENTIFIER="
Fixes weird messages like:
May 20 22:23:30 jik2 TIFIER=systemd-logind[795]: New session 46 of user gdm.

https://bugzilla.redhat.com/show_bug.cgi?id=823498
2012-05-21 20:03:26 +02:00
Lennart Poettering
8f33b5b8b3 util: rework in_initrd() logic
Checking the device major/minor is not a good idea. Let's replace this
with an explicit flag file, which we model after /etc/os-release and
call /etc/initrd-release.
2012-05-21 20:00:58 +02:00
Lennart Poettering
2660882b52 main: rename a few fix to follow general naming style 2012-05-21 19:48:04 +02:00
Lennart Poettering
416693175b switch-root: move switch_root() call into its own .c file 2012-05-21 19:33:39 +02:00
Harald Hoyer
97a66e9470 main: do_switch_root() do not recursively remove across device boundaries 2012-05-21 18:53:02 +02:00
Harald Hoyer
597f43c784 util: rm_rf_children() add root_dev parameter
if root_dev is set, remove subdirectories only, if the device is the
same as the root_dev. This prevents to remove files across device
boundaries.
2012-05-21 18:52:49 +02:00
Harald Hoyer
d966a7b363 delta/delta.c: initialize bottom for fail state 2012-05-21 18:51:44 +02:00
Harald Hoyer
c3ba62509e core/main.c: handle the initrd timestamp differently, if in the initrd
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-21 18:51:05 +02:00
Harald Hoyer
e148ac5a6c core/main.c: do_switch_root(): do not remove the old root if not in initrd
Only recursively remove the old root, if we have been in an
initrd/initramfs.
2012-05-21 18:50:29 +02:00
Harald Hoyer
d03bc1b814 core/main.c: add "--switchedroot" parameter
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-21 18:50:06 +02:00