Commit graph

123 commits

Author SHA1 Message Date
Fabiano Fidencio 07459bb6b9 sysv: optionally disable of SysV init/rcN.d support at compile time
This patch adds a cpp definition HAVE_SYSV_COMPAT that is used to
isolate code dealing with /etc/init.d and /etc/rcN.d for systems where
it does not make sense (one that does not use sysv or one that is fully
systemd native).

The patch tries to be as little intrusive as possible, however in
order to minimize the number of #ifdef'ed regions I've reordered some
code in path-lookup.c:lookup_paths_init() where all code dealing with
sysv is now isolated under running_as == MANAGER_SYSTEM as well.

Moreover, In struct Service, some fields were rearranged to reduce
the number of ifdefs.

Lennart's suggestions were fixed and squashed with the original patch,
that was sent by Gustavo Sverzut Barbieri (barbieri@profusion.mobi).
2010-09-27 03:25:05 +02:00
Lennart Poettering 05d6a3b6cf manager: calculate progress value while booting 2010-09-21 04:25:48 +02:00
Michal Schmidt aa5939a3ba systemctl: make condrestart equivalent to try-restart
"condrestart" should be equivalent to "try-restart", i.e. it should be
translated into "TryRestartUnit". See
http://fedoraproject.org/wiki/Packaging:SysVInitScript#condrestart_and_try-restart

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=635780
2010-09-21 00:24:23 +02:00
Lennart Poettering b036fc0050 systemctl: use sizeof() instead of strlen() on literal strings 2010-09-15 03:12:04 +02:00
Zbyszek Szmek 9b2fcafba4 systemctl: split job list writing to a seperate function
On Tue, Sep 14, 2010 at 10:23:28PM +0200, Lennart Poettering wrote:
> On Tue, 07.09.10 17:02, Zbigniew Jędrzejewski-Szmek (zbyszek@in.waw.pl) wrote:
>
> Urks, now I commited the wrong one... Can you prep an updated patch against
> current git?
Once more sorry about that.

Fix below.

Zbyszek
2010-09-15 03:05:02 +02:00
Zbigniew Jędrzejewski-Szmek 3333022269 systemctl: limit some column widths to widest actually used
old
UNIT                      LOAD   ACTIVE       SUB                JOB
dev-hugepages.automount   loaded active       running                            Huge Page
dev-mqueue.automount      loaded active       waiting                            POSIX Mes
proc-sys...misc.automount loaded active       waiting                            Arbitrary
sys-kern...ebug.automount loaded active       running                            Debug Fil

new
UNIT                      LOAD   ACTIVE SUB       JOB
dev-hugepages.automount   loaded active running       Huge Pages File System Automount Poi
dev-mqueue.automount      loaded active waiting       POSIX Message Queue File System Auto
systemd-shutdownd.socket  loaded active listening     systemd Delayed Shutdown Socket
2010-09-14 22:16:28 +02:00
Zbigniew Jędrzejewski-Szmek eb68c413aa systemctl: split job list writing to a seperate function 2010-09-14 22:15:41 +02:00
Zbigniew Jędrzejewski-Szmek ef639c5f9e systemctl: use on_tty() helper everywhere 2010-09-14 22:14:52 +02:00
Lennart Poettering 6f0d624ec7 systemctl: use isolate when called as telinit for a runlevel 2010-09-14 02:22:55 +02:00
Lennart Poettering 7d568925bd systemctl: make --version a little bit more verbose 2010-09-06 03:11:24 +02:00
Lennart Poettering 35df8f27fa systemctl: implement --version
https://bugs.freedesktop.org/show_bug.cgi?id=29912
2010-09-06 02:42:49 +02:00
Lennart Poettering 5d452f9cec dbus: make sure to flush bus connection before disconnecting, so that no messages are lost 2010-09-02 23:26:04 +02:00
Lennart Poettering aabd9b11ba systemctl: make sure daemon-reexec and friends return a correct error code 2010-09-01 02:11:52 +02:00
Lennart Poettering 706900b704 systemctl: fix return value of systemctl start and friends 2010-09-01 02:03:41 +02:00
Lennart Poettering fe71c02cf5 manager: reword some error messages regarding "logs"
https://bugzilla.redhat.com/show_bug.cgi?id=627785
2010-09-01 00:32:32 +02:00
Lennart Poettering 22f4096ca9 systemctl: rework exit codes for all utility programs to follow LSB or other standards 2010-08-31 21:05:54 +02:00
Lennart Poettering f73e33d9ec systemctl: avoid wrapping of headers/footers
This change makes sure that our output never exceeds 80ch on 80ch
terminals.

https://bugzilla.redhat.com/show_bug.cgi?id=626443
2010-08-31 16:56:08 +02:00
Matthew Miller fdf20a3160 manager: add missing second part of s/maintenance/failed/ 2010-08-31 00:23:34 +02:00
Matthew Miller cc8a7a6129 systemctl: very very trivial typo patch :) 2010-08-26 02:04:25 +02:00
Lennart Poettering 4cf5d67507 dbus: simplify some dbus error messages a bit 2010-08-25 19:50:06 +02:00
Lennart Poettering f3d41013e2 systemctl: rename a few status lines 2010-08-25 03:14:04 +02:00
Lennart Poettering 584be568b9 systemctl: show timestamps for state changes 2010-08-25 03:13:44 +02:00
Lennart Poettering f1e36d677a systemctl: add --sysv-compat 2010-08-25 03:13:09 +02:00
Lennart Poettering c4e2ceae94 dbus: follow standardized fdo PropertiesChanged signal spec 2010-08-20 02:31:54 +02:00
Lennart Poettering d06dacd002 service/systemctl: don't consider LSB exit codes 5 and 6 as failure, and decode exit codes in systemctl 2010-08-20 02:31:54 +02:00
Lennart Poettering 85ad5b18ad systemctl: break output properly for 80ch terminals 2010-08-17 18:53:47 +02:00
Lennart Poettering f276a41821 shutdown: drop -f/-F switches again, simply because we don't want to condone non-ro root dirs
Instead of using /forcefsck and /fastboot people should just kernel
command line options to achieve the same.
2010-08-17 18:13:47 +02:00
Lennart Poettering 08e4b1c5c8 shutdown: various fixes for handling of delayed shutdowns 2010-08-16 22:40:11 +02:00
Lennart Poettering 2396fb04f7 log: properly open log target in the various utilities 2010-08-16 22:39:02 +02:00
Lennart Poettering a2a3a5b93c systemctl: sort case-insensitively 2010-08-16 20:07:01 +02:00
Lennart Poettering 9be9828c00 systemctl: warn in intervals before going down when delayed shutdown is used 2010-08-16 19:26:27 +02:00
Lennart Poettering 6b5ad000ab shutdown: if now time argument is passed, imply +1 not +0
That should friendlier for folks who just run "shutdown" to figure out
the command line arguments...

https://bugzilla.redhat.com/show_bug.cgi?id=624149
2010-08-16 17:12:40 +02:00
Lennart Poettering f614480831 systemctl: add support for delayed shutdown, similar to sysv in style 2010-08-16 15:37:52 +02:00
Lennart Poettering d6c9574fb5 emacs: make sure nobody accidently adds tabs to our sources 2010-08-14 19:59:25 +02:00
Lennart Poettering d90e1a301d systemctl: skip writing of utmp if we booted using systemd, under the assumption that systemd-update-utmp is used 2010-08-14 19:14:52 +02:00
Lennart Poettering 36c32ba297 systemctl: sort 'list-units' output 2010-08-14 03:40:10 +02:00
Lennart Poettering fbc43921be systemctl: properly detect whether taling to systemd via D-Bus worked before falling back to upstart/initctl 2010-08-13 04:53:33 +02:00
Lennart Poettering 75676b7287 man: document new 'systemctl status PID' syntax 2010-08-13 02:15:10 +02:00
Lennart Poettering 598b557bf0 systemctl: when calling 'status' accept a PID 2010-08-13 02:07:22 +02:00
Lennart Poettering c31b4423a9 systemctl: show sysv path if it is set if the fragment path isn't in systemctl status 2010-08-13 01:29:30 +02:00
Lennart Poettering 3059b1c1f4 systemctl: at full stop after last message before shutting down 2010-08-12 17:15:10 +02:00
Lennart Poettering e364ad0628 clang: fix numerous little issues found with clang-analyzer 2010-08-11 22:04:25 +02:00
Lennart Poettering 2ee68f7211 systemctl: beef up highlighting of service states a little 2010-08-11 15:19:31 +02:00
Lennart Poettering cd6d0a456b utmp: enable systemd-update-utmp by default 2010-08-11 04:38:55 +02:00
Lennart Poettering 69dd2852bb manager: when two pending jobs conflict, keep the one that "conflicts", remove the one that is "conflicted"
This gives the writer of units control which unit is kept and which is
stopped when two units conflict.
2010-08-09 22:32:30 +02:00
Lennart Poettering 6d4fc029d9 systemctl: show exit code only if it is actually set 2010-08-09 17:06:18 +02:00
Michal Schmidt 4a4d6b4b31 systemctl: fix parsing of DBus reply in 'dot'
"systemctl dot" has been broken since the addition of the "Following="
property.
2010-08-07 18:08:03 +02:00
Michal Schmidt a042efad57 reboot: handle -p switch properly
https://bugzilla.redhat.com/show_bug.cgi?id=618678
2010-08-05 19:50:03 +02:00
Lennart Poettering d5ca5f1185 telinit: forward to upstart, if not booted with systemd 2010-07-24 02:33:38 +02:00
Lennart Poettering ec7f7f2006 systemctl: don't use the systemd bus to talk to upstart 2010-07-24 02:23:40 +02:00