Commit graph

2255 commits

Author SHA1 Message Date
Lennart Poettering fc8af9ff3f login: introduce sd_session_get_display() 2012-02-15 04:56:10 +01:00
Lennart Poettering 2aa4c31529 timedate: don't fail if NTP is not installed
https://bugzilla.redhat.com/show_bug.cgi?id=790260
2012-02-15 00:05:31 +01:00
Lennart Poettering 51f58f083a login: add new sd_session_get_type() and sd_session_get_class API calls 2012-02-14 21:54:00 +01:00
Lennart Poettering 55efac6cbc login: track login class (i.e. one of "user", "greeter", "lock-screen") for each session
This introduces the new PAM environment variable XDG_SESSION_CLASS. If
not set, defaults to "user".

This is useful for apps that want to distuingish real user logins from
"fake" ones which just exist to show a gdm login screen or a lock
screen.
2012-02-14 21:37:49 +01:00
Kay Sievers a82034ba58 update sd-daemon files 2012-02-14 14:44:34 +01:00
Lennart Poettering 283b73b3bb path-lookup: search for unit files in /lib/systemd/system only on split /usr systems 2012-02-14 00:24:49 +01:00
Lennart Poettering 72e764a691 dbus: update bus addresses to "unixexec:" protocol specifier
The new protocol specified that we are settling on is "unixexec:" rather
than just "exec:", hence let's update our code accordingly.

https://bugs.freedesktop.org/show_bug.cgi?id=35230
2012-02-13 23:50:03 +01:00
Lennart Poettering 50b1678aab sd-login: if NULL or 0 is passed as first parameter of the sd_xxx functions, work on objects of the calling process 2012-02-13 23:50:02 +01:00
Michael Biebl a26c9cc604 Fix broken Git repository URLs 2012-02-13 17:49:09 +01:00
Kay Sievers 3ce4fad8f5 always use /etc/os-release and ignore all distro-specific files
The text mode welcome message will only show the distro name stored
in /etc/os-release and no longer read any distro-specific files.  If
/etc/os-release does not exist, 'Linux' will be printed.

When the source tree is is ./configure'd, only /etc-os-release is read
to guess the distro to build for. If /etc/os-release does not exist,
--with-distro= needs to be specified.
2012-02-13 01:51:51 +01:00
Lennart Poettering 4099a281bb util: fix handling of empty files in read_one_line_file()
https://bugs.freedesktop.org/show_bug.cgi?id=45362
2012-02-11 00:27:12 +01:00
Lennart Poettering 89f134406a logind: introduce CanReboot/CanPowerOff bus calls 2012-02-11 00:13:10 +01:00
Michal Schmidt 5c72face73 cgroup: fix inverted condition
A bug was introduced in acb14d3 "cgroup: when getting cgroup empty
notifications, always search up the tree".

When the given cgroup is found the hashmap, we should be happy and
return it, not go looking up the tree for another one.

Fixes the hanging NetworkManager on shutdown for me.
2012-02-10 02:57:45 +01:00
Lennart Poettering 1b73da108b logind: make seat device management accessible to normal users/via polkit 2012-02-10 02:35:48 +01:00
Benjamin Franzke 80df5f4c3b logind: Allow PowerOff/Reboot in default context 2012-02-10 02:33:41 +01:00
Lennart Poettering 02c4ef9c35 service: imply NotifyAccess=main if WatchdogSec= is used 2012-02-09 21:11:25 +01:00
Michael Olbrich 4b9397474f service: add StartLimitInterval/StartLimitBurst/StartLimitAction 2012-02-09 21:01:29 +01:00
Michal Schmidt 81006b8ad8 install: fix incorrect 'Access denied' message with a non-existent unit
With "systemctl is-enabled non-existent.service"
_UNIT_FILE_STATE_INVALID (-1) was wrongly interpreted as -errno.
Return -ENOENT in this case.

https://bugzilla.redhat.com/show_bug.cgi?id=766579
2012-02-09 10:36:56 +01:00
Michal Schmidt ab5919fa1a systemctl: check for no more work after chkconfig
Avoid a bogus message from 'systemctl enable ...' when all units given
are SysV services:
   Warning: unit files do not carry install information. No operation
   executed.

https://bugzilla.redhat.com/show_bug.cgi?id=787407
2012-02-09 10:05:15 +01:00
Lennart Poettering 353e12c2f4 service: ignore SIGPIPE by default 2012-02-09 03:18:04 +01:00
Dave Reisner cea6691857 modules-load: resolve aliases before insert modules
This keeps behavior in line calling /sbin/modprobe -- aliases will be
resolved to the relevant modules, and errors from inserting modules
which are already loaded are ignored.
2012-02-09 01:44:54 +01:00
Lennart Poettering cdb454f2de kmod: make GCC shut up 2012-02-09 01:24:40 +01:00
Tom Gundersen 83684a3553 modules-load: use libkmod rather than modprobe 2012-02-09 00:47:09 +01:00
Tom Gundersen 728beb28a7 kmod-setup: use libkmod rather than modprobe 2012-02-09 00:43:05 +01:00
Lennart Poettering cafac610a7 ratelimit: if interval/burst are set to 0, assume ratelimiting shall be disabled 2012-02-08 21:35:49 +01:00
Michael Olbrich 6e0bcc980b service: set WATCHDOG_USEC environmen variable 2012-02-08 17:11:06 +01:00
Michael Olbrich bb242b7b52 service: introduce WatchdogSec and hook up the watchdog with the existing failure logic 2012-02-08 17:10:38 +01:00
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
Benjamin Franzke 1d4ec31570 logind: Terminate bus_login_session_user_properties
Fixes segfault in systemd-logind, triggered by:
systemd-loginctl show-session $XDG_SESSION_ID.

Bug introduced by d200735e13,
so only systemd v39 is affected.
2012-02-07 23:52:58 +01:00
Lennart Poettering cae5846b2c logind: fix introspection data 2012-02-07 20:12:21 +01:00
Lennart Poettering 84c3361e12 logind: introduce ActivateSessionOnSeat() 2012-02-07 20:12:13 +01:00
Lennart Poettering acdfc041cc ratelimit: fix macro definition 2012-02-07 15:56:53 +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 db1355b1c1 mount: adjust dependencies for remote filesystems
Currently remote mounts automatically get:
 After=remote-fs-pre.target network.target

remote-fs-pre.target is already After=network.target. Just make sure
remote-fs-pre.target is pulled in by remote-fs.target if any remote
filesystems are configured.
For the mount units it is then sufficient to get:
 After=remote-fs-pre.target

Later NetworkManager will hook its NM-wait-online.service into
remote-fs-pre.target.wants in order to remove the need for the administrator
to enable the service manually when he has any remote filesystems.

https://bugzilla.redhat.com/show_bug.cgi?id=787314
2012-02-07 11:22:48 +01:00
Lucas De Marchi 96b2eef25b builtin: kmod - depend on libkmod >= 5 2012-02-07 00:49:59 +01:00
Bruno Redondi 6118dab105 keymap: Add Fujitsu Siemens Amilo Li 2732
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2012-02-06 09:00:59 +01:00
Lennart Poettering acb14d318b cgroup: when getting cgroup empty notifications, always search up the tree 2012-02-03 05:25:31 +01:00
Lennart Poettering cd43ca73e1 path: convert failure field to enum 2012-02-03 05:06:04 +01:00
Lennart Poettering e1770af812 swap: replace failure boolean by result enum 2012-02-03 05:06:04 +01:00
Lennart Poettering 067d72c9fe timer: convert failure bool into enum 2012-02-03 05:06:04 +01:00
Lennart Poettering 81a5c6d03e automount: convert failure boolean to enum 2012-02-03 05:06:04 +01:00
Lennart Poettering 9d2f51788e mount: replace failure boolean by enum 2012-02-03 05:06:03 +01:00
Lennart Poettering cfc4eb4cba socket: replace failure boolean by enum 2012-02-03 05:06:03 +01:00
Lennart Poettering f42806df7d service: replace "failure" boolean by enum, and export it
This should give admins more useful hints why a service failed.
2012-02-03 05:06:03 +01:00
Chris Paulson-Ellis ec3f9b53f8 util: prevent daemon-reload from reaping service processes.
The reaping of generator processes run as part of a daemon-reload should not
call waitid(PID_ALL). The waitid() call in execute_directory() is intended only
to reap the executed processes, but if a service process exits at about the
same time as a daemon-reload, then that service process is reaped as well,
preventing it from being reaped in the proper place in
manager_dispatch_sigchld().

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43625
2012-02-02 19:11:16 +01:00
Alvaro Soliverez ce09557917 sd-daemon: support for building sd-daemon.c with Bionic (Android)
sd-daemon.h is a drop-in file, so we should make sure it doesn't break
builds for anybody.

https://bugs.freedesktop.org/show_bug.cgi?id=42675
2012-02-02 19:11:16 +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 803a3464ce coredump: avoid coredump loops, divert coredump if journald itself is crashing 2012-02-02 01:22:49 +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
Michael Olbrich a6927d7ffc service: add watchdog timestamp
This patch adds WatchdogTimestamp[Monotonic] to the systemd service
D-Bus API. The timestamp is updated to the current time when the
service calls 'sd_nofity("WATCHDOG=1\n")'.
Using a timestamp instead of an 'alive' flag has two advantages:
1. No timeout is needed to define when a service is no longer alive.
   This simplifies both configuration (no timeout value) and
   implementation (no timeout event).
2. It is more robust. A 'dead' service might not be detected should
    systemd 'forget' to reset an 'alive' flag. It is much less likely
    to get a valid new timestamp if a service died.
2012-02-01 19:29:19 +01:00
Lennart Poettering c4aa65e714 logind: add GetSessionByPID() bus call 2012-02-01 19:04:54 +01:00
Andreas Schwab 2b2823b4b5 ata_id: fix identify string fixup 2012-02-01 12:58:27 +01:00
Kay Sievers 09db3f5b66 ata_id: whitespace fixes 2012-02-01 12:58:27 +01:00
James M. Leddy 705b2a87cc keymap: Fix touchpad toggle button on Lenovo Ideapad
https://launchpad.net/bugs/922405

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2012-02-01 05:49:46 +01:00
Michal Schmidt ede3deb425 socket: typo in dump output 2012-02-01 00:00:34 +01:00
Lennart Poettering 9b221b63e5 logind: if we have to stop a session, kill at least its leader 2012-01-31 23:51:39 +01:00
Lennart Poettering 9ba1a15985 load-fragment: properly parse size values denoted in bytes 2012-01-31 20:53:34 +01:00
Lennart Poettering be19b7df6e journal: increase compression threshold for objects from 64 to 512
Apparently the perfomance price for compression is to steep to apply it
for all objects >= 64 and < 512 in size, as measured by Arjan Van De
Ven, hence increase the threshold to 512 which yields better results.
2012-01-31 20:38:53 +01:00
Ray Strode 8906b207d1 login: lock down input devices on extra seats
We need to tell the X server to grab the keyboards
and mice associated with a hotplugged seat, so that
it doesn't have the ability to control the kernel
vt consoles.
2012-01-31 20:00:36 +01:00
Kay Sievers 927f3bc468 extras: cdrom_id - create only /dev/cdrom 2012-01-30 19:03:05 +01:00
Kay Sievers 4f552cc7a0 pkg-config: rootlibexecdir -> systemdutildir
Better don't export historic names for split / vs. /usr filesysystems.
2012-01-30 16:32:18 +01:00
Kay Sievers 19b66dc57c extras: cdrom_id - create /dev/cdrom and conditionally /dev/dvd for sr0
Udev does no longer automatically create udev rules in /etc from the
device hotplug path.

No device name reservation will happen anymore; this model creates
too many problems for setups with many device changes or media which
is booted on different hardware.

Enumerated device names which are based on device discovery order or
on persistent on-disk name reservation will in general not be supported
by udev in the future. It is a problem that can not be solved properly,
and it always creates new problems at the same time it tries to solve
the original one. Udev will no longer pretend it can solve these issues,
and people should switch to available alternatives which provide the
far better compromise.

From now on, udev will only create /dev/cdrom for the first optical
drive, and if the drive is capable /dev/dvd. No other devices will
get any compatibility symlinks or enumerated device names like cdrom1,
cdrom2, and so on. The /dev/cdrom and /dev/dvd links have by default
a negative link priority, which will cause them to be overwritten by
any other device which clains the same names with already existing
udev rules.

If stable device names are needed, the /dev/disk/by-id/ links, which
uniquely identify a specific piece of hardware should be used. The links
usually contain a device serial number and the link names will not depend
on device discovery order.

If completely identical devices with identical or no serial number
need to be handled at the same time, the /dev/disk/by-path/ links can
be used. These links depend on the physical port which is used to connect
the device. It will change when the same device is moved to a different
port or host adapter.

If custom names are needed, custom udev rules which match on specific
device properties need to be added by the administrator.
2012-01-30 15:20:12 +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
Kay Sievers e7f3289033 do not stop rule processing when device node is no longer around
Device nodes might have been deleted again by the kernel before an
'add' or 'change' event is even started. We need to run all rules,
regardless of the state in /dev.
2012-01-29 05:48:45 +01:00
Lennart Poettering 02b16a19a4 logind: make sure we create /var/lib/systemd before using it 2012-01-27 20:48:28 +01:00
Lennart Poettering ab8da6c266 pkg-config: export libexecdir, so that that gdm can use it to find the x server wrapper 2012-01-27 19:06:34 +01:00
Lennart Poettering 7d9eaa8461 socket: if SO_RCVBUFFORCE fails, fall back to SO_RCVBUF, to have at least a little effect 2012-01-27 18:58:02 +01:00
Lennart Poettering bb99a35a87 log: increase socket buffers for logging by default 2012-01-27 18:57:37 +01:00
Lennart Poettering 632117b71f log: never delay logging if the log server is stuck, always drop messages quickly 2012-01-27 18:14:06 +01:00
Kay Sievers a3642381eb builtin: blkid - add missing ID_ prefix for PART_ENTRY_* keys 2012-01-26 17:56:18 +01:00
Michal Schmidt da375869ff mount: fix automount regression
Tom Gundersen noticed a regression where comment=systemd.automount in
fstab no longer prevented the adding of the After=foo.mount dependency
into local-fs.target. He bisected it to commit 9ddc4a26.

It turns out that clearing the default_dependencies flag is necessary
after all, in order to avoid complementing of Wants= with After= in the
target unit. We still want to add the dependencies on quota units and
umount.target though.
2012-01-26 01:19:19 +01:00
Lennart Poettering 7d39db92c5 virt: detect LXC+libvirt containers 2012-01-25 00:13:05 +01:00
Lennart Poettering caa9488700 man: document systemd-cgtop tool 2012-01-25 00:12:47 +01:00
Kay Sievers 9c4eda1260 fix path to extras 2012-01-24 15:12:46 +01:00
Lennart Poettering be70cdd67a login: fix multi-seat check 2012-01-24 05:15:04 +01:00
Lennart Poettering b16f53046d login: extend comments in multi-seat-x 2012-01-24 04:32:09 +01:00
Kay Sievers e605cf7782 use sysname() for devices without a device node 2012-01-24 04:29:59 +01:00
Lennart Poettering 36db9a8d5b login: add multi-session X wrapper
In preparation for https://bugzilla.gnome.org/show_bug.cgi?id=655380 we
decided it's better to include the multi-seat X wrapper in systemd,
rather than gdm. (Side effect: this makes this accessible for other
DMs)

This is a stop-gap for now, until X gins proper multi-seat graphics
support at which point this code will go away without replacement.
2012-01-23 23:34:36 +01:00
Lennart Poettering a558d00381 journal: move journal TODO into main TODO 2012-01-23 22:01:29 +01:00
Lennart Poettering 7c69716810 util: use /dev/rtc symlink if possible before we go searching for a suitable device 2012-01-23 21:56:55 +01:00
Kay Sievers a7ef118174 move variable inside condition 2012-01-23 05:21:13 +01:00
Kay Sievers 0ecfcbd4f7 print warning when rules try to rename kernel device nodes 2012-01-23 05:15:12 +01:00
Kay Sievers b0a0080677 use devnode() for $name not sysname(), device nodes might be in a subdirectory 2012-01-23 04:44:35 +01:00
Kay Sievers a1525d1720 fix some fallout from tab removal 2012-01-22 22:44:13 +01:00
Kay Sievers 131a4dcfd4 login: move seat udev rules to login subdir 2012-01-22 18:32:13 +01:00
Lennart Poettering 8f2d43a012 cgtop: add new cgtop tool 2012-01-22 18:22:26 +01:00
Lennart Poettering 1733ca5475 tmpfiles: fix bad memory access 2012-01-22 18:22:26 +01:00
Lennart Poettering 1e5678d023 cgls: don't show kernel threads by default 2012-01-22 18:22:26 +01:00
Kay Sievers d2b795f2b9 libudev: do not set DEVNAME= twice
When we read the 'uevent' file we need to make sure, that we do not
read the relative DEVNAME= path provided by the kernel and overwrite
the absolute path udev expects here.
2012-01-21 06:18:32 +01:00
Dan Horák ce3fd7e72a journal: systemd v38 fails to build on big-endians
Hi,

during the builds for Fedora/s390x I've found that systemd v38 fails to
build on big-endian platforms.

...
make[2]: Entering directory `/root/systemd'
  CC     src/journal/libsystemd_journal_la-sd-journal.lo
src/journal/sd-journal.c: In function 'init_location':
src/journal/sd-journal.c:69:22: error: incompatible types when
initializing type 'long unsigned int' using type 'sd_id128_t'
src/journal/sd-journal.c:69:20: error: incompatible types when assigning
to type 'sd_id128_t' from type 'long unsigned int'
make[2]: *** [src/journal/libsystemd_journal_la-sd-journal.lo] Error 1

I see the problem in using le64toh() on the 16 bytes boot_id structure
in init_location()

Please see
http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=544375 for a
full build log and attachment for a proposed fix.

With regards

Dan
2012-01-21 03:48:26 +01:00
Lennart Poettering d1f262fa46 systemctl: don't show ln -s/rm output in 'install' mode if --quiet is passed 2012-01-21 03:44:11 +01:00
Lennart Poettering 51122dc9e3 util: open the first RTC that has hctosys=1 set 2012-01-21 03:15:54 +01:00
Kay Sievers 430959910f warn about deprecated RUN+="socket:" use 2012-01-21 03:07:32 +01:00
Lennart Poettering 05aa9edde0 readahead: don't monopolize IO when replaying 2012-01-21 02:51:13 +01:00
Lennart Poettering aa001cd699 dbus: export ControlGroupPersistent field on the bus again 2012-01-21 01:47:53 +01:00
Michal Schmidt 1a710b430b socket: don't fail the socket on ENOTCONN
Albert Strasheim reported a socket unit with Accept=yes was failing
sometimes.
getpeername() returns ENOTCONN if the connection was killed by TCP RST.
The socket unit must not fail when it happens.

Reproducer available at:
https://bugzilla.redhat.com/show_bug.cgi?id=783344
2012-01-20 23:57:54 +01:00
Michal Schmidt 229b5d55f6 dbus-execute: don't publish control_group_persistent on DBus for now
Since the addition of ControlGroupPersistent, systemd is trivially
killed by "systemctl status any.service".
bus_property_append_bool must not be used for a tri-state int.
Also, should it really "b", or do we want the tri-state nature to be seen?

For now just comment out the buggy DBus property.
2012-01-20 03:03:25 +01:00
Michal Schmidt 3e52541ef5 service: add missing pid file unwatch in the destructor
The pid file watch could outlive the service unit if a daemon-reload
request came at the right time. The inotify event would then be
delivered to who knows where.

Fix it by unwatching in the service destructor.

Further changes will be needed to preserve the state of the pid file
watch across daemon-reload. For now let's just fix the crash observed
by Jóhann Guðmundsson:
Assertion 's->state == SERVICE_START || s->state == SERVICE_START_POST'
failed at src/service.c:2609, function service_fd_event().  Aborting

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=783118
2012-01-20 00:51:56 +01:00
Michal Schmidt a3f914b2a2 log: move #pragma around the function
Koen reported errors with gcc 4.5.4 for arm:
src/log.c:624:9: error: #pragma GCC diagnostic not allowed inside
functions
2012-01-19 13:00:34 +01:00
Kay Sievers 891703e1ee persistant -> persistent 2012-01-18 21:47:30 +01:00
Lennart Poettering 31ed59c511 tmpfiles: support writing short strings to files, in order to support /sys manipulations at boot time, a la sysctl 2012-01-18 16:39:04 +01:00
Lennart Poettering 88f0664562 manager: don't place units in the 'cpu' group when run as user instance, for now 2012-01-18 15:41:21 +01:00
Lennart Poettering 9058851be7 journal: when sending journal data via file, place it in /dev/shm, to allow early boot operation, even if it sucks 2012-01-18 15:40:58 +01:00
Lennart Poettering 8d53b4534a exec: introduce ControlGroupPersistant= to make cgroups persistant 2012-01-18 15:40:21 +01:00
Lennart Poettering 62f21ec91a journalctl: properly honour -n when -f is passed, too 2012-01-18 13:56:02 +01:00
Lennart Poettering 468d726bdd tmpfiles: add support for creating symlinks, char/block device nodes 2012-01-18 13:56:02 +01:00
Lennart Poettering fc3c1c6e09 logind: move X11 socket 2012-01-18 13:56:02 +01:00
Lennart Poettering 129eebe020 logind: simplify session_activate() a bit 2012-01-18 13:56:02 +01:00
Lennart Poettering abc5bbc6f0 logind: allow to create multiple sessions on non-multi-session seats to deal with left-over sessions 2012-01-18 13:56:02 +01:00
Martin Pitt 46505c52a6 keymap: Add Alienware M14xR1
https://launchpad.net/bugs/901513
2012-01-18 12:14:54 +01:00
Martin Pitt c861d52fd6 keymap: Fix keyboard brightness keys on Samsung 700Z series
https://launchpad.net/bugs/902332
2012-01-18 12:06:58 +01:00
Martin Pitt 1cb6889100 keymap: Fix eject button on Samsung 700Z series
https://launchpad.net/bugs/902798
2012-01-18 12:05:01 +01:00
Martin Pitt 4bebab9998 keymap: Fix rfkill button on Hewlett-Packard HP ProBook
https://bugs.launchpad.net/bugs/914838
2012-01-18 11:34:44 +01:00
Kay Sievers e64fae5573 udevd: kill hanging event processes after 30 seconds
Some broken kernel drivers load firmware synchronously in the module init
path and block modprobe until the firmware request is fulfilled.

The modprobe-generated firmware request is a direct child device of the
device which caused modprobe to run. Child device event are blocked until
the parent device is handled. This dead-locks until the kernel firmware
loading timeout of 60 seconds is reached.

The hanging modprobe event should now time-out and allow the firmware
event to run before the 60 second kernel timeout.
2012-01-18 05:06:18 +01:00
Michal Schmidt 281605bf14 util: fix ANSI sequence for red color
Red turned green by mistake in commit c1072ea0.
2012-01-17 12:54:45 +01:00
Michal Schmidt b7f336383d log: make asserts cheaper
On my x86_64 this shrinks the size of .text by 53 KB (7 %).
2012-01-17 12:34:53 +01:00
Michal Schmidt 2b7dec8661 log: remove useless variable
abort() never returns. Not even if the signal handler catches SIGABRT.
2012-01-17 12:34:53 +01:00
Michal Schmidt e2110e5d1b dbus-unit: make functions static
The dbus_unit_append_*() functions are not referenced from outside anymore.
2012-01-17 12:34:53 +01:00
Kay Sievers 1b9e13e2e2 builtin: blkid - add missing ID_ prefix
<ridikulus_rat>  60-persistent-storage.rules gpt by-partlabel/by-partuuid
  symlinks not created in udev-177 util-linux-2.20.1 kmod-3 in Archlinux x86_64.
<falconindy> ridikulus_rat: fix the rule, or fix the blkid builtin ;)
<kay> oh, i missed the ID_ stuff? :)
2012-01-16 15:38:41 +01:00
Michal Schmidt d200735e13 dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
 - only the .data members change at runtime, yet the whole arrays of
   properties with all the fields are constructed on the stack one by
   one by the code.
 - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
   are repeated in several unit types.

Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).

On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt 595ed347a8 unit: use safe downcasts, remove pointless casts
Always use the macros for downcasting.
Remove a few obviously pointless casts.
2012-01-16 13:34:42 +01:00
Michal Schmidt 1124fe6f01 unit: use the UNIT() macro consistently
The UNIT() macro upcasts from specific unit types to the base Unit.
Use it everywhere, rather than accessing the 'meta' member directly.
2012-01-16 13:34:42 +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
Michal Schmidt 7d17cfbc46 unit: reduce heap usage for unit objects
The storage of the unit objects on the heap is currently not very
efficient. For every unit object we allocate a chunk of memory as large
as the biggest unit type, although there are significant differences in
the units' real requirements.
pahole shows the following sizes of structs:
488  Target
496  Snapshot
512  Device
528  Path
560  Timer
576  Automount
1080 Socket
1160 Swap
1168 Service
1280 Mount

Usually there aren't many targets or snapshots in the system, but Device
is one of the most common unit types and for every one we waste
1280 - 512 = 768 bytes.

Fix it by allocating only the right amount for the given unit type.
On my machine (x86_64, with 39 LVM volumes) this decreases systemd's
USS (unique set size) by more than 300 KB.
2012-01-16 13:34:42 +01:00
Michal Schmidt 1637a8be55 logind: downgrade login message to debug
The messages make people nervous.

https://bugzilla.redhat.com/show_bug.cgi?id=727315
2012-01-16 13:18:17 +01:00
Lennart Poettering fee80f6956 journal: drop privileges when storing coredump 2012-01-14 03:37:32 +01:00
Lennart Poettering e6acda19b2 journal: when show blob data show length 2012-01-14 03:07:47 +01:00
Lennart Poettering 32895bb390 util: support formatting eta and peta bytes with format_bytes() 2012-01-14 03:07:29 +01:00
Lennart Poettering a7bc2c2ac8 util: introduce FORMAT_BYTES_MAX 2012-01-14 03:06:57 +01:00
Lennart Poettering de0229ca36 journal: collect coredump up to 24M in size 2012-01-14 03:05:34 +01:00
Lennart Poettering 4c7de07481 journal: handle empty syslog identifier properly 2012-01-14 01:54:33 +01:00
Lennart Poettering 5c3759bf8a journal: fix bad memory access 2012-01-14 01:54:33 +01:00
Lennart Poettering 0dad12c190 journal: if the data to be sent is larger than the maximum datagram size resort to passing a temporary fd over native protocol 2012-01-14 01:54:33 +01:00
Lennart Poettering f5e04665eb journal: hook up coredumping with journal 2012-01-14 01:54:33 +01:00
Lennart Poettering 755a02c680 journal: add new system-cat tool as kind of a more powerfull BSD logger 2012-01-14 01:54:33 +01:00
Lennart Poettering 3043935f02 util: split out tty_is_vc_resolve() from default_term_for_tty() 2012-01-14 01:54:33 +01:00
Lennart Poettering c1072ea0da util: rework ANSI escape code macros 2012-01-14 01:54:33 +01:00
Michal Schmidt 9ddc4a26e5 mount: fix quota
quotacheck.service and quotaon.service were not pulled in for fstab mounts.
Fix it by not clearing the default_dependencies flag.

The root filesystem may have quotas too, so don't check for "/" there.

No need to have duplicate code for adding dependencies on umount.target.

https://bugzilla.redhat.com/show_bug.cgi?id=773431
2012-01-14 00:12:10 +01:00
Lennart Poettering 6ef25fb65e pam: fix build 2012-01-13 20:52:45 +01:00
Lennart Poettering fc7985ed67 pam: work correctly if a seat is specified but not vtnr 2012-01-13 20:51:58 +01:00
Lennart Poettering d3f2bdbfee journal: add output mode that just prints simple messages without any decorations 2012-01-13 02:58:45 +01:00
Lennart Poettering f987397649 api: add C++ guards to all headers 2012-01-13 00:49:21 +01:00
Lennart Poettering ebda471d89 sd-login: teach sd_pid_get_unit() proper handling of instantiated services 2012-01-13 00:49:02 +01:00
Evan Nemerson a5f834204f gudev: several minor introspection fixes
- Include exported package information
  - Include C include information
  - g_udev_device_get_parent & g_udev_device_get_parent_with_subsystem
    transfer ownership of their return values

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
2012-01-12 09:06:43 +01:00
Lennart Poettering 7c8bbccd07 journal: if the syslog forwarder socket is full, then don't block 2012-01-12 05:09:24 +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 5ba081b0fb log: make internal log api log directly to the journal 2012-01-12 04:34:31 +01:00
Lennart Poettering 8a0f04e6a2 journal: add SELinux context to all logged messages 2012-01-11 22:45:05 +01:00
Lennart Poettering b785c858c3 journal: fix more 32/64 bit issues 2012-01-11 22:44:43 +01:00
Lennart Poettering fdcad0c255 tmpfiles: fix parsing of /proc/net/unix on 32Bit machines
Tracked down by Michael Meeks
2012-01-11 22:08:33 +01:00
Michal Schmidt 52beb2c379 logs-show: fix missing newline in short output
Ellipsized messages were printed without a newline.
2012-01-11 21:53:00 +01:00
Kay Sievers 2b76eb68ac man: mention that no daemons should be started by udev 2012-01-11 21:49:25 +01:00
Lennart Poettering 7f120cc6a2 journald: don't assume size_t and uint64_t are the same 2012-01-11 21:24:02 +01:00
Lennart Poettering 5e41cfec83 journald: set group ownership of journal files to 'adm' by default 2012-01-11 21:11:58 +01:00
Lennart Poettering e6520a0fce journal: make requirement for ACLs optional 2012-01-11 20:40:29 +01:00
Lennart Poettering d1e44dd827 journalctl: fix --help text 2012-01-11 16:03:42 +01:00
Lennart Poettering 1921a5cb3d journal: don't realign window twice 2012-01-11 03:55:24 +01:00
Lennart Poettering 19a2bd80c1 sd-journal: implement a number of non-implemented calls from the API for now 2012-01-11 03:23:04 +01:00
Lennart Poettering 731a676c20 systemd: reconnect to syslog as soon as the journal is fully up 2012-01-11 03:16:24 +01:00
Lennart Poettering 3ebcdf8cd9 journalctl: always show monotonic timestamp even if it's from an old boot 2012-01-11 03:02:10 +01:00
Lennart Poettering 4dcc1cb415 unit: implement new PropagateReloadTo=/PropagateReloadFrom= operations 2012-01-11 02:52:34 +01:00
Lennart Poettering bd1a698180 shutdown: add link to root storage daemon text 2012-01-11 02:52:34 +01:00
Lennart Poettering 8f53a7b8ea service: brutally slaughter processes that are running in the cgroup when we enter START_PRE and START 2012-01-11 02:52:34 +01:00
Kay Sievers bd59d82322 fix compiler warning 2012-01-10 19:37:41 +01:00
Kay Sievers db8f32f6ed cdrom_id: int -> bool 2012-01-10 16:37:41 +01:00
Lennart Poettering 7e4ab3c5a6 shutdown: exclude processes with argv[0][0] from killing 2012-01-10 05:03:59 +01:00
Kay Sievers 22dde8d712 fix debug message 2012-01-10 02:06:36 +01:00
Kay Sievers 912541b024 tabs are as useful as a hole in the head 2012-01-10 01:34:15 +01:00
Lucas De Marchi 6a6b254354 builtin: kmod - log if modules are blacklisted 2012-01-09 20:40:29 +01:00
Kay Sievers 1111415a75 doc: fix out of tree build (copy from libkmod) 2012-01-09 17:38:29 +01:00
Lennart Poettering bf96736674 journalctl: display source timestamp, not journald timestamp, if known 2012-01-07 05:00:28 +01:00
Lennart Poettering 67a122058b journalctl: add new short-monotonic output mode 2012-01-07 04:41:30 +01:00
Lennart Poettering 6c1e6b98bd journald: add kmsg source 2012-01-07 04:10:21 +01:00
Lennart Poettering aaf53376aa journald: remove inner loop debug message 2012-01-07 04:10:21 +01:00
Kay Sievers ebd91b34d7 fix compiler warning 2012-01-07 02:12:43 +01:00
Lennart Poettering e4bac488f9 sd-id128: let's make our API a bit smaller, since sd_id128_make_v4_uuid() is dispensable 2012-01-07 01:37:39 +01:00
Lennart Poettering 39f7f5c108 journalctl: rename --new-id to --new-id128 in order not to introduce yet another new name 2012-01-07 01:37:15 +01:00
Lennart Poettering dd338f01f5 build-sys: move .pc files next to the matching sources 2012-01-07 01:36:36 +01:00
Lennart Poettering 4ff77f66af load-fragment: fix parsing of Socket= setting 2012-01-07 01:26:08 +01:00
Lennart Poettering 509b6efbbe main: fix spelling 2012-01-07 01:26:08 +01:00
Lennart Poettering effb1102d3 journald: introduce systemd_journald.forward_to_kmsg=1 (and friends) to enable kmsg forwarding globally via kernel cmdline 2012-01-07 01:26:08 +01:00
Lennart Poettering 98736c68fe journald: shorten the time we wait for a forwarding syslog 2012-01-06 23:11:28 +01:00
Lennart Poettering 57020a3abf unit: properly update references to units which are merged
When we merge units that some kind of object points to, those pointers
might become invalidated, and needs to be updated. Introduce a UnitRef
struct which links up all the unit references, to ensure corrected
references.

At the same time, drop configured_sockets in the Service object, and
replace it by proper UNIT_TRIGGERS resp. UNIT_TRIGGERED_BY dependencies,
which allow us to simplify a lot of code.
2012-01-06 23:08:54 +01:00
Lennart Poettering 73aa0c00df service: add dependencies on configured sockets 2012-01-06 19:23:03 +01:00
Kay Sievers ad29a9f14f merge udev/, libudev/, systemd/ files in src/; move extras/ to src/ 2012-01-06 05:07:10 +01:00
Lennart Poettering 4c0bebc335 kmsg-syslogd: remove kmsg-syslogd, since it's entirely obsoleted and replaced by journald 2012-01-06 03:11:17 +01:00
Lennart Poettering 64f5002a3a special: fix name of journal socket unit 2012-01-06 02:48:38 +01:00
Lennart Poettering 706343f492 journal: introduce log target 'journal' for executed processes 2012-01-06 02:48:38 +01:00
Lennart Poettering db5973704b stdout: remove stdout-syslog-bridge since it is now obsoleted by journald 2012-01-06 02:48:38 +01:00
Michal Schmidt 5c0100a537 util: switch the console to text mode on reset
In case we're taking over the console after a killed X server.

https://bugzilla.redhat.com/show_bug.cgi?id=771563
2012-01-06 01:34:02 +01:00
Michal Schmidt df465b3f44 util: fix switching to console unicode mode
The KDSKBMODE ioctl wants a value directly, not its address.
2012-01-06 01:28:30 +01:00
Lennart Poettering eff406331a login: implement sd_session_get_service() 2012-01-05 23:14:22 +01:00
Lennart Poettering 4cd9a9d9ec journal: rename syslog tag to identifier since that's what we call it on the server side. 2012-01-05 21:46:48 +01:00
Lennart Poettering 258cdffc2f journal: rename priority_prefix to level_prefix, since that's how we call it in PID 1 2012-01-05 21:39:59 +01:00
Lennart Poettering 86b9b8e70d sd-journal: close reading side of sd_journal_stream_fd() file descriptors 2012-01-05 21:39:31 +01:00
Lennart Poettering 54fe0cdbe3 execute: talk directly to the journald, instead to the stdout-syslog-bridge 2012-01-05 21:39:08 +01:00
Lennart Poettering 33eb8abfa5 journal: store used transport in journal 2012-01-05 20:24:34 +01:00
Lennart Poettering 259d2e7620 journal: move sockets into their own subdir 2012-01-05 20:24:16 +01:00
Lennart Poettering 55d7bfc19b journalctl: rework short output mode to rebuild full syslog message 2012-01-05 20:11:47 +01:00
Lennart Poettering 8ab49c12dc headers: fix git URLs for source files 2012-01-05 18:25:36 +01:00