summaryrefslogtreecommitdiff
path: root/src/systemctl
AgeCommit message (Collapse)Author
2015-11-11systemctl: make sure list-jobs doesn't return failure on successLennart Poettering
2015-11-11systemctl: add a comment that clarifies why we do "return r" at the end of ↵Lennart Poettering
main() To avoid confusion as outlined in #1845.
2015-11-11Revert "systemctl: return EXIT_SUCCESS on success"Lennart Poettering
This reverts commit 6a32563caa883bd11da1b255c38358e481c42ad7.
2015-11-11Merge pull request #1839 from evverx/fix-systemctl-cancelTom Gundersen
systemctl: fix cancel
2015-11-11systemctl: return EXIT_SUCCESS on successEvgeny Vereshchagin
2015-11-10Remove snapshot unit typeZbigniew Jędrzejewski-Szmek
Snapshots were never useful or used for anything. Many systemd developers that I spoke to at systemd.conf2015, didn't even know they existed, so it is fairly safe to assume that this type can be deleted without harm. The fundamental problem with snapshots is that the state of the system is dynamic, devices come and go, users log in and out, timers fire... and restoring all units to some state from the past would "undo" those changes, which isn't really possible. Tested by creating a snapshot, running the new binary, and checking that the transition did not cause errors, and the snapshot is gone, and snapshots cannot be created anymore. New systemctl says: Unknown operation snapshot. Old systemctl says: Failed to create snapshot: Support for snapshots has been removed. IgnoreOnSnaphost settings are warned about and ignored: Support for option IgnoreOnSnapshot= has been removed and it is ignored http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
2015-11-11systemctl: fix cancelEvgeny Vereshchagin
http://www.freedesktop.org/software/systemd/man/systemctl.html#cancel%20JOB... > If no job ID is specified, cancel all pending jobs
2015-11-02systemctl: port to extract_first_wordSusant Sahani
2015-10-31systemctl: add a way to explicitly request client-side unit installingLennart Poettering
This adds support for a new environment variable SYSTEMCTL_INSTALL_CLIENT_SIDE, that ensures that systemctl executes install operations client-side instead of passing them to PID1. This is useful in debugging situations, but even beyond that. However, we don't want to make it official API, hence let's just make it an undocumented environment variable. Similar, add a second variable, SYSTEMCTL_SKIP_SYSV which allows skipping the SysV chkconfig fall-back if set. This is useful for similar reasons, and exposed as undocumented as environment variable for similar reasons, too.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-27util-lib: split out globbing related calls into glob-util.[ch]Lennart Poettering
2015-10-27util-lib: move running_in_chroot() into virt.[ch]Lennart Poettering
It's a very weak kind of virtualization, after all.
2015-10-27util-lib: move more locale-related calls to locale-util.[ch]Lennart Poettering
2015-10-27util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch]Lennart Poettering
2015-10-27util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering
2015-10-27util-lib: split out resource limits related calls into rlimit-util.[ch]Lennart Poettering
2015-10-27util: remove path_get_parent(), in favour of dirname_malloc()Lennart Poettering
We don't need two functions that do essentialy the same, hence drop path_get_parent(), and stick to dirname_malloc(), but move it to path-util.[ch].
2015-10-27util-lib: split string parsing related calls from util.[ch] into parse-util.[ch]Lennart Poettering
2015-10-26util-lib: split out user/group/uid/gid calls into user-util.[ch]Lennart Poettering
2015-10-26util-lib: split out IO related calls to io-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24path-util: unify how we process paths specified on the command lineLennart Poettering
Let's introduce a common function that makes relative paths absolute and warns about any errors while doing so.
2015-10-22systemctl: the various list commands actually can take any number of argumentsLennart Poettering
I accidentally broke this a while back when I ported systemctl to the verbs logic. Add support for this back.
2015-10-01systemctl: fix how we decode types and statesLennart Poettering
There was a bad memory access among other smaller issues.
2015-10-01systemctl: fix memory leak in systemctl_parse_argvreverendhomer
This commit fixes Coverity #1325228
2015-09-30Merge pull request #1422 from keszybz/sd-daemon-mq-badfLennart Poettering
sd-daemon: fix return value for sd_is_mq
2015-09-30Merge pull request #1419 from keszybz/shell-completionLennart Poettering
Shell completion tweaks
2015-09-30systemctl: do not set variable to be immediately overwrittenZbigniew Jędrzejewski-Szmek
2015-09-30systemctl: when reading legacy -t argument for shutdown, don't drop ↵Lennart Poettering
following parameter We currently completely ignore the following parameter, but we really should not, as that is actually the time to shut down on.
2015-09-30systemctl: various modernizationsLennart Poettering
2015-09-30tree-wide: use strempty() where possibleDaniel Mack
Also add a Coccinell patch to detect such locations in the future.
2015-09-29systemctl: when a shutdown is scheduled, always go via logindLennart Poettering
2015-09-29systemctl: minor modernizationsLennart Poettering
2015-09-29systemctl: port verb dispatching to generic verbs.[ch] codeLennart Poettering
Let's parse the command line the same way in our various tools.
2015-09-29systemctl: prefer shutting down through logind even as rootLennart Poettering
Otherwise, wall messages will not be generated for root.
2015-09-29systemctl: split out code invoking SetExitCode() into function of its ownLennart Poettering
2015-09-29systemctl: don't assert on the arguments array unnecessarilyLennart Poettering
In most verbs it's fine to treat the arguments array being NULL is empty array, hence do so.
2015-09-29systemctl: make use of strv_skip() where appropriateLennart Poettering
2015-09-29systemctl: make use of log_error_errno() where we canLennart Poettering
Also adds a couple of "return" statements, where they are missing.
2015-09-29systemctl: rework how we connect to bussesLennart Poettering
Sometimes we have to connect to the system manager directly (early boot, initrd, late boot, ...), sometimes through the system bus (unprivileged, remote, logind, ...). Instead of guessing in advance, which kind of connection we require (and sometimes guessing incorrectly), let's make sure each time we need bus connection we request the right bus explicitly. This way, we set up exactly the bus connections require, never guess incorrectly, and do so only immediately when necessary. As effect this reworks avoid_bus() into install_client_side(), since that's all it determines now: whether to install unit files client-side or server-side (i.e. in PID 1).
2015-09-29bus-util: rename bus_open_transport() to bus_connect_transport()Lennart Poettering
In sd-bus, the sd_bus_open_xyz() family of calls allocates a new bus, while sd_bus_default_xyz() family tries to reuse the thread's default bus. bus_open_transport() sometimes internally uses the former, sometimes the latter family, but suggests it only calls the former via its name. Hence, let's avoid this confusion, and generically rename the call to bus_connect_transport(). Similar for all related calls. And while we are at it, also change cgls + cgtop to do direct systemd connections where possible, since all they do is talk to systemd itself.
2015-09-29systemctl: rename parse_time_spec() to parse_shutdown_time_spec()Lennart Poettering
Let's clarify that this function is specific to shutdown time specifications, nothing else.
2015-09-29systemctl: conditionalize /dev/initctl fallback on HAVE_SYSV_COMPATLennart Poettering
2015-09-29systemctl: allocate arg_wall only on the heapLennart Poettering
Previously, we'd allocate it sometimes from the heap, but otherwise let it point directly int argv[]. Let's clean this up, so that we know exactly how to release its resources, and do so at the end.
2015-09-29systemctl: add 'const' where appropriateLennart Poettering
2015-09-29systemctl: remove client-side wall message supportLennart Poettering
logind sends out wall messages now, let's remove this from the systemctl client side hence. If people build systemd without logind support they won't get wall messages now, but that's OK.
2015-09-29systemctl: move strv_skip_first() out of systemctl.cLennart Poettering
Make it generic, call it strv_skip() and move it to strv.[ch]
2015-09-29systemctl: split out code that schedules shutdowsn into its own functionLennart Poettering
2015-09-29systemctl: rename all logind-specific functions to logind_xyz()Lennart Poettering
2015-09-29systemctl: move shutdown cancelling code into its own functionLennart Poettering
Let's make sure the main switch statement only invokes functions, but doesn't do anything real on its own.