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

8403 Commits

Author SHA1 Message Date
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
Harald Hoyer
f38ed06060 manager: only serialize the timestamps for the initramfs if in_initrd() 2012-05-21 18:49:31 +02:00
Harald Hoyer
9be346c94e util.c: add in_initrd()
in_initrd() checks, if the stat() for the device for "/" is 1, which it
is for the initramfs.
2012-05-21 18:47:39 +02:00
Harald Hoyer
f67cc036ba main: corrected do_switch_root()
do_switch_root now mount moves "/dev", "/proc", "/sys", "/run" and
removes the old root recursively.
2012-05-21 18:45:10 +02:00
Nis Martensen
386da8589b delta: fix spelling of overridden 2012-05-21 18:31:43 +02:00
Frederic Crozat
4d768ced49 util: fix typo in newdup 2012-05-21 18:18:49 +02:00
Lennart Poettering
06e2968ea6 update TODO 2012-05-21 18:18:15 +02:00
Auke Kok
940c521034 sd-pam: Drop uid so parent signal arrives at child.
The PAM helper thread needs to capture the death signal from the
parent, but is prohibited from doing so since when the child dies
as normal user, the kernel won't allow it to send a TERM to the
PAM helper thread which is running as root.

This causes the PAM threads to never exit, accumulating after
user sessions exit.

There is however really no need to keep the PAM threads running as
root, so, we can just setresuid() to the same user as defined in the
unit file for the parent thread (User=). This makes the TERM signal
arrive as normal. In case setresuid() fails, we ignore the error, so
we at least fall back to the current behaviour.
2012-05-21 17:57:48 +02:00
Lennart Poettering
5b40d33761 update TODO 2012-05-21 17:55:54 +02:00
Daniel Mack
89834a7c1c journalctl: fix built-in usage output
This brings journalctl's built-in usage output in sync with the man page.
There are no commands to pass, and the help screen should not confuse
users.
2012-05-21 17:30:11 +02:00
Matthew Monaco
2a2aab602e cryptsetup: support discards (TRIM) 2012-05-21 17:28:06 +02:00
Lennart Poettering
b8f8323268 main: try a bit harder to find an init process to execute after reexec/switch-root 2012-05-21 17:26:19 +02:00
Lennart Poettering
3614084261 service: make the fsck pass no configurable 2012-05-21 17:24:26 +02:00
Lennart Poettering
f7f21d33db cryptsetup: a few simplifications 2012-05-21 17:22:40 +02:00
Lennart Poettering
344de60901 hostname-setup: also consider (ńone) an unset hostname 2012-05-21 17:19:58 +02:00
Lennart Poettering
97f25a02ee update TODO 2012-05-21 15:34:33 +02:00
Lennart Poettering
b86fa936ce update TODO 2012-05-21 15:28:07 +02:00
Lennart Poettering
78d54bd42b unit: introduce RequiredBy= setting in [Install], to complement WantedBy= 2012-05-21 15:27:26 +02:00
Lennart Poettering
6ccf7562da login: minor typo fix 2012-05-21 15:22:28 +02:00
Lennart Poettering
49dbfa7b2b units: introduce new Documentation= field and make use of it everywhere
This should help making the boot process a bit easier to explore and
understand for the administrator. The simple idea is that "systemctl
status" now shows a link to documentation alongside the other status and
decriptionary information of a service.

This patch adds the necessary fields to all our shipped units if we have
proper documentation for them.
2012-05-21 15:14:51 +02:00
Michal Schmidt
a223b325b4 systemctl: drop useless DBus calls from 'systemctl show foo.service'
systemctl called LoadUnit, GetUnit, GetAll in this order to get the properties.

It is useless to load units explicitly, because it won't ensure anything. The
unit may be freed immediately by the garbage collector.

It is unnecessary to call GetUnit, because systemctl can easily translate the
unit name to DBus path by itself.

GetAll will load the unit if necessary.
2012-05-21 12:59:00 +02:00
Michal Schmidt
80fbf05e75 dbus-unit: always load the unit before handling a message for it
We need to be able to show the properties even of inactive units.
systemctl loads the unit before getting its properties, but this is racy
as the garbage collector may kick in right after the loading.

Fix it by always loading the unit before handling a message for it.

https://bugzilla.redhat.com/show_bug.cgi?id=814966#c6
2012-05-21 12:54:34 +02:00
Lennart Poettering
c0ef53aa5b delta: drop PHP'ism 2012-05-21 02:02:40 +02:00
Lennart Poettering
8e812a2301 delta: don't highlight unchanged files 2012-05-21 02:02:31 +02:00
Lennart Poettering
1ab27db890 update TODO 2012-05-21 02:02:19 +02:00
Lennart Poettering
866062b152 delta: introduce arg_flags field, to follow our usual scheme 2012-05-21 02:01:52 +02:00
Lennart Poettering
c8021373fb delta: use same nomenclature for equivalent and redirected everywhere 2012-05-16 18:57:57 +02:00
Lennart Poettering
4c4e643161 delta: enums are much cooler than defines 2012-05-16 18:53:46 +02:00
Gergely Nagy
807f464522 delta: Support filtering what type of deltas to show
Not everyone is interested in every kind of deltas (and some might
even be interested knowing which files do not have overrides), so this
here is an implementation of a --type=LIST... option for
systemd-delta, that makes it possible to filter what subset of deltas
we want.

The available modifiers are masked, equivalent, redirected, overriden,
and unchanged - they should be self explanatory, and the man page
explains them in a little more detail anyway.

As a side effect, in case of overriden files, the diff output was made
optional.

By default, everything is shown (with a diff, if appropriate) except
for completely unchanged files.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2012-05-16 18:51:26 +02:00
Lennart Poettering
3ea6e73287 delta: add preset dirs 2012-05-16 03:40:42 +02:00
Lennart Poettering
7e8d5761ec delta: add missing files 2012-05-16 03:36:42 +02:00
Lennart Poettering
ee83acc49b switch-root: check for absolute paths 2012-05-16 03:24:50 +02:00
Lennart Poettering
27b5482cc0 delta: add systemd-delta tool to find overriden configuration and unit files 2012-05-16 03:24:50 +02:00
Kay Sievers
c195956988 udev: update docs, NEWS 2012-05-15 23:44:28 +02:00
Kay Sievers
20bbd54f60 udev: libudev - bump soname, remove deprecated functions, introduce symbol versions 2012-05-15 23:06:26 +02:00
Kay Sievers
6e92b23f0d build-sys: support build-from-git without gobject-introspection 2012-05-15 15:05:36 +02:00