summaryrefslogtreecommitdiff
path: root/src/shared
AgeCommit message (Collapse)Author
2013-03-07pager: introduce "jump to end" optionHarald Hoyer
$ journalctl -be is what you want :) https://bugzilla.redhat.com/show_bug.cgi?id=867841
2013-03-07util: Fix grammar in commentJan Janssen
2013-03-07virt: check for /sys/hypervisor/type for detecting xen PVLennart Poettering
https://bugs.freedesktop.org/show_bug.cgi?id=61491
2013-03-05util: properly escape corner cases in bus_path_escape(), tooLennart Poettering
This follows the suggestions from: http://lists.freedesktop.org/archives/systemd-devel/2013-March/009363.html
2013-03-02job: print the "OK" status messages in normal greenMichal Schmidt
The "OK" status messages should not draw attention to themselves. It's better if they're not printed in bright/bold. Leave that to errors and warnings. Use a plain inconspicuous enterprisey green.
2013-03-01path-lookup: downgrade again the messages where we log for unitsLennart Poettering
This partially reverts 7ad94c716d6403233d04c4d37cb14df958c9b65d. After that commit commands such as "systemctl enable" and friends printed the search path information multiple times in its output, which is ugly. If we want the search paths to be printed at a higher log level, then we should do this in PID 1 only, i.e. split the printing out of the normal path lookup logic and invoke that explicitly from PID 1 but not in the auxiliary tools.
2013-03-01pager: add K to less environmentLukas Nykryn
Using less as a pager sometimes breaks terminal when output is interrupted by ctrl-c. Reproducer: run 'sudo journalctl' ctrl-c. Thanks mbriza@redhat.com for the solution.
2013-02-27systemd-activate: add a socket-activation test toolZbigniew Jędrzejewski-Szmek
2013-02-28core/manager: print status messages about running jobsMichal Schmidt
Sometimes the boot gets stuck until a timeout hits. The usual timeouts are on the order of minutes, so users may lose patience. Print animated status messages telling the names of units with running jobs to make it easy to see what systemd is waiting for. The animation looks cooler with a shorter interval, but 1 s is OK and should not be too hard on slow serial console users.
2013-02-28util: split resolving of /dev/console into a new functionMichal Schmidt
2013-02-28util, core: add support for ephemeral status linesMichal Schmidt
Ephemeral status lines do not end with a newline and they expect to be overwritten by the next printed status line.
2013-02-27unit: rework resource management APILennart Poettering
This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.
2013-02-27Revert "log: fix fallbacks to kmsg"Lennart Poettering
This reverts commit 4a01181e460686d8b4a543b1dfa7f77c9e3c5ab8. This patch broke LOG_TARGET_AUTO, i.e. automatic selection of STDERR if it is a TTY with a fallback on the journal and kmsg otherwise. The general rule should probably be: log_open() -- open the "best" possible logging channel according to log_target configuration. log_dispatch() -- don't open any log channels ever, with the exception of kmsg since that has no drawbacks. And do this only on true errors of the better log channel, not just when it wasn't opened.
2013-02-17efi: compare by substractionKay Sievers
2013-02-16log: fix fallbacks to kmsgMichal Schmidt
write_to_journal() returns 0 if journal_fd is closed and nothing is written. We need to make sure we'll try log_open_kmsg() then to make the fallback work for "journal-or-kmsg".
2013-02-14bootchart: use conf-parser & CamelCase names in .confThomas Hindoe Paaboel Andersen
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13dbus: introduce parse_unit_infoMarc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2013-02-13dbus: import struct unit_info from systemctlMarc-Antoine Perennou
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2013-02-13build-sys: make EFI support build-time optionalLennart Poettering
2013-02-13build-sys: make PolicyKit support compile-time optional (was ↵Lennart Poettering
runtime-optional already)
2013-02-13efi: efi_get_boot_options() should already sort the entries, the random ↵Lennart Poettering
order in the efivars fs is probably not useful This also introduces a new FOREACH_DIRENT macro and makes use of it.
2013-02-13efi: use efi_get_variable_string() instead of efi_get_variable() where we canLennart Poettering
2013-02-13efi: unify BootXXXX readingKay Sievers
2013-02-13Revert "log_error() if inotify_add_watch() fails"Lennart Poettering
This reverts commit 2826d14091e43ed3397d862dee79d09d0115c84e. We never should generate log messages from a library.
2013-02-13log_error() if inotify_add_watch() failsHarald Hoyer
[zj: Reworded message s/to watch/to add watch on/ to make it clear that it was the watch init action that failed, and not the "process of watching". I think this way it'll be clearer to people who don't know what inotify does.]
2013-02-13man: rename systemd.conf to systemd-system.confZbigniew Jędrzejewski-Szmek
Alias as systemd-user.conf is also provided. This should help users running systemd in session mode. https://bugzilla.redhat.com/show_bug.cgi?id=690868
2013-02-13ratelimit: fix off-by-oneMichael Olbrich
The current code might make sense during startup for service restart limiting: With burst=1 after starting num is 1, so the next ('first') restart is still accepted ( 1 <= 1). However, once interval has expired, num is 1 after the first restart, so the second restart is also accepted. This change is also useful in combination with watchdogs: With burst=1 and a very large interval the system can be restarted on the first failure.
2013-02-13util: *DO NOT* loop for EINTR handling with close_nointr()Colin Walters
See the linked references for why we should not do this.
2013-02-13util: introduce strcaseeq/strncaseeqThomas Hindoe Paaboel Andersen
2013-02-13use strneq instead of strncmpThomas Hindoe Paaboel Andersen
2013-02-13efi: add missing #includeLennart Poettering
2013-02-13efi: various cleanupsLennart Poettering
2013-02-13missing: define MS_REC and MS_SHARED if not defined alreadyAleksander Morgado
2013-02-11binfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services ↵Lennart Poettering
that work on .d/ directories This unifies much of the logic behind them: - All four will now ofllow the rule that the earlier file and earlier assignment in the .d/ directories wins. Before, sysctl was the only outlier, where the later setting always won. - All four now support getopt() and --help on the command line. - All four can now handle specification of configuration file names on the command line to apply. The tools will automatically find them, and apply them. Previously only tmpfiles could do that. This is useful for %post scripts in RPMs and suchlike. - This fixes various error path issues in conf_files_list()
2013-02-11core: properly validate environment data from Environment= lines in unit filesLennart Poettering
2013-02-11manager: validate environment parameters for SetEnvironment(), ↵Lennart Poettering
UnsetEnvironment() bus calls
2013-02-11bootctl: add boot loader and firmware interface toolKay Sievers
2013-02-11efi: fix returned length of efi_get_variable()Lennart Poettering
2013-02-11util: rework load_env_file()Lennart Poettering
Inner library calls should not invoke log_oom(), that's something for main programs, not library calls. Don't read through uninitialized memory if a file ends in a continuation line. Add comments for the non-obvious bits. Don't choke on comment lines that are continuation lines. Simplify some things.
2013-02-11path-util: fix memory leakLennart Poettering
2013-02-11util: introduce FOREACH_LINE for iterating through filesLennart Poettering
2013-02-11env: considerably beef up environment cleaning logicLennart Poettering
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
2013-02-08shared: conf-files - use root parameter and convert to auto-cleanupKay Sievers
2013-02-08shared: conf-files - add root parameterKay Sievers
2013-02-07logs-show: show messages for all unit types in systemctl statusMirco Tischler
I can't find a reason why we shouldn't try to output messages for other unit types than .service, .socket, .mount and .swap as well. It's probably a leftover from before we started logging UNIT= from inside PID 1.
2013-02-07journal: log user units for coredumps and show them in systemctl statusMirco Tischler
2013-02-06systemd: raise level of message about lookup pathsZbigniew Jędrzejewski-Szmek
This can be pretty important for the user, and is not trivial to figure out in all cases. Also show failing path in error messages.
2013-02-06shared: remove now unused functionZbigniew Jędrzejewski-Szmek
2013-02-06systemd: do not remove empty paths from unit lookup pathZbigniew Jędrzejewski-Szmek
The ability to start a new unit with 'systemctl start ...' should not depend on whether there are other units in the directory. Previously, an additional 'systemctl daemon-reload' would be necessary to tell systemd to update the list of unit lookup paths.