summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
AgeCommit message (Collapse)Author
2015-05-15systemctl: introduce --now for enable, disable and maskJan Synacek
https://bugs.freedesktop.org/show_bug.cgi?id=42940
2015-05-12systemctl: fix check for template unitsThomas Hindoe Paaboel Andersen
A typo from 7410616c. We want to ignore EINVAL but only catch errors.
2015-05-11core: rename SystemdRunningAs to ManagerRunningAsLennart Poettering
It's primarily just a property of the Manager object after all, and we try to refer to PID 1 as "manager" instead of "systemd", hence let's to stick to this here too.
2015-05-11treewide: Correct typos and spell plural of bus consistentTorstein Husebø
2015-05-06systemctl: null-initialize pointer with cleanup attributeDaniel Buch
2015-05-05core: rework unit name validation and manipulation logicLennart Poettering
A variety of changes: - Make sure all our calls distuingish OOM from other errors if OOM is not the only error possible. - Be much stricter when parsing escaped paths, do not accept trailing or leading escaped slashes. - Change unit validation to take a bit mask for allowing plain names, instance names or template names or an combination thereof. - Refuse manipulating invalid unit name
2015-04-24systemctl: kill newline characters from log_error_errno() callsDaniel Mack
log_error_errno() already adds a newline, so drop them.
2015-04-24systemctl: talk to logind for scheduled shutdownsDaniel Mack
Drop the code which communicates with shutdownd via its private socket, and use the functionality in logind instead. The code pathes which talk to logind have to create their own ad-hoc bus connection because by default, systemctl connects to systemd's private socket.
2015-04-24shared/utmp-wtmp: add parameter for origin tty and callback userdataDaniel Mack
Instead of looking up the tty from STDIN, let utmp_wall() take an argument to specify an origin tty for the wall message. Only if that argument is NULL do the STDIN lookup. Also add an void *userdata argument that is handed back to the callback function.
2015-04-14systemctl: avoid bumping NOFILE rlimit unless neededZbigniew Jędrzejewski-Szmek
We actually only use the journal when showing status. Move setrlimit call so it is only called for status. https://bugzilla.redhat.com/show_bug.cgi?id=1184712
2015-04-11shared: add terminal-util.[ch]Ronny Chevalier
2015-04-10shared: add process-util.[ch]Ronny Chevalier
2015-04-10shared: add formats-util.hRonny Chevalier
2015-04-08systemctl: Use logind for --firmware-setup if possibleJan Janssen
2015-04-07logind,systemctl: add reboot to EFI firmware supportJan Janssen
2015-03-13tree-wide: there is no ENOTSUP on linuxDavid Herrmann
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2015-03-07systemctl: remove dead checkZbigniew Jędrzejewski-Szmek
r could never be less than zero. CID #1271350.
2015-03-02core: expose consumed CPU time per unitLennart Poettering
This adds support for showing the accumulated consumed CPU time per-unit in the "systemctl status" output. The property is also readable via the bus.
2015-02-24systemctl: bump NOFILE only for systemctl_mainZbigniew Jędrzejewski-Szmek
It is not necessary when running as telinit, etc. https://bugzilla.redhat.com/show_bug.cgi?id=1184712
2015-02-23systemctl: support auditd.service betterZbigniew Jędrzejewski-Szmek
We would print the filename header before trying to open the file. But since the header was printed to stdout, and the error to stderr, the error would appear on the terminal before the header. It is cleaner to open the file first, then and only then print the header. Also exit on first error. We shouldn't report success if we were unable to open a file.
2015-02-23systemctl: check validity of PID we receivedZbigniew Jędrzejewski-Szmek
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-18everywhere: remove configurability of sysv runlevel to target mappingLennart Poettering
With this change runlevel 2, 3, 4 are mapped to multi-user.target for good, and 5 to graphical.target. This was already the previous mapping but is now no longer reconfigurable, but hard-coded into the core. This should generally simplify things, but also fix one bug: the sysv-generator previously generated symlinks to runlevel[2-5].target units, which possibly weren't picked up if these aliases were otherwise only referenced by the real names "multi-user.target" and "graphical.target". We keep compat aliases "runlevel[2345].target" arround for cases where this target name is explicitly requested.
2015-02-18systemctl: allow interactive authorization for all bus callsLennart Poettering
Make use of the new sd_bus_set_allow_interactive_authorization() call to globally enable interactive authorization. Also, turn on PK agent for more calls. This allows us to make use of the sd_bus_call_method() convencience helper at more places.
2015-02-18systemctl: let's make use of FOREACH_STRING() where we canLennart Poettering
2015-02-16Transpose args in strv_fnmatch() to be more ooZbigniew Jędrzejewski-Szmek
2015-02-16Add helper for fnmatch over strvZbigniew Jędrzejewski-Szmek
2015-02-12remove unused variableThomas Hindoe Paaboel Andersen
2015-02-11systemctl: don't update the reboot parameter if none is givenMichael Olbrich
Otherwise systemd-reboot.service will remove the parameter that was set before. This was broken in commit "b986229efe2cc96157aa14c37bab7843311bbef1 systemctl: bugfix for systemctl reboot command with argument"
2015-02-04systemctl: unit_find_paths(): unify error handling in two code pathesIvan Shapovalov
2015-02-04systemctl: cat, edit: further polish error messagesIvan Shapovalov
2015-02-04systemctl: cat: fix error handlingIvan Shapovalov
- correctly check for local vs. remote transport - return after receiving error from expand_names()
2015-02-04systemctl: cat, edit: improve unit load error reportingIvan Shapovalov
- report actual load error for units which could not be loaded - make unit_find_paths() report all kinds of errors it encounters (for consistency) - consistently handle not-found errors in cat() and edit()
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2015-01-28systemctl: refuse --host with catZbigniew Jędrzejewski-Szmek
This might be fixed one day, but for now it's better to fail. https://bugzilla.redhat.com/show_bug.cgi?id=1186952
2015-01-23systemctl: bugfix for systemctl reboot command with argumentSangjung Woo
According to systemctl man page, 'systemctl reboot [arg]' should work without any errors. However, it does not work because of 'Invalid number of arguments' error, except for 'reboot [arg]'. This patch fixes the bug so that both of commands work in exactly the same way.
2015-01-23core: add a property that shows the current memory usage of a unitLennart Poettering
This is exposed the memory.usage_in_bytes cgroup property on the bus, and makes "systemctl status" show it in its default output.
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2015-01-19systemctl: do not show dots with --plainZbigniew Jędrzejewski-Szmek
Plain implies a ... "plain" output. Also do not say "No jobs" with --no-legend. We skip reporting the number of jobs with --no-legend if there are any, and 0 is also a number, and should be skipped.
2015-01-19systemctl: fix import-environment description, trim help to 80 colsZbigniew Jędrzejewski-Szmek
2015-01-09systemctl: add missing output modes to help messageRonny Chevalier
2015-01-08machined: when cloning a raw disk image, also set the NOCOW flagLennart Poettering
2015-01-08man: bring systemctl man page and --help text into the same orderLennart Poettering
2015-01-08systemctl,loginctl: start polkit agent for all polkit enabled operationsLennart Poettering
2015-01-08machinectl: show most recent log output in "machinectl status", tooLennart Poettering
2015-01-08loginctl: show the 10 most recent log user/session log lines in "loginctl ↵Lennart Poettering
user-status" and "loginctl session-status"
2015-01-08journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)Lennart Poettering
When there are a lot of split out journal files, we might run out of fds quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible. Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K, the hard at 4K by default for normal user processes, this code hence bumps this up for users to 4K. https://bugzilla.redhat.com/show_bug.cgi?id=1179980
2015-01-05path-lookup, systemctl: export lookup_paths_init_from_scope() from ↵Ivan Shapovalov
shared/install.c and use it
2015-01-05systemctl: properly iterate through service array when dispatching to sysvLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=1175734
2014-12-30systemctl: do not repeat hibernate/sleep attemptsZbigniew Jędrzejewski-Szmek
If some sleep operation was not possible (e.g. because swap is missing), we would try twice: once through logind, which would result in a clean error: Failed to execute operation: Sleep verb not supported and then second time by starting the appropriate unit directly, which is more messy. If logind tells us that something is not possible (or already in progress), report that to the user and quit. If logind is present and working we should not try to work around it. Loosely based on https://bugs.freedesktop.org/show_bug.cgi?id=87832.