b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
cab2aca3e7dc9966eb9f45416f34729719f01dd4 |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: fix support for transient resource limit properties
Make sure we can properly process resource limit properties. Specifically, allow transient configuration of both the
soft and hard limit, the same way from the unit files. Previously, only the the hard rlimits could be configured but
they'd implicitly spill into the soft hard rlimits.
This also updates the client-side code to be able to parse hard/soft resource limit specifications. Since we need to
serialize two properties in bus_append_unit_property_assignment() now, the marshalling of the container around it is
now moved into the function itself. This has the benefit of shortening the calling code.
As a side effect this now beefs up the rlimit parser of "systemctl set-property" to understand time and disk sizes
where that's appropriate. |
d152dd467afe0eacb322900ea7f91946c55c40e9 |
|
29-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: actually honour the try-reload-or-restart verb aabf5d4243408 promised
The verb entry got lost in the ultimate commit. |
1e726cc963016b91dfe3bb31319dec652f3b6f3a |
|
29-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make most systemctl commands NOPs in a chroot() environment
Fixes #2015 |
040524b4a3e37e4705969004611b7e934552b533 |
|
29-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: consider a chroot() environment always offline |
aabf5d42434082ae4e2d0c98d4705f58ee707567 |
|
28-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: rename "reload-or-try-restart" verb to "try-reload-or-restart"
But also keep the old name as (undocumented) compatibility around.
The reload-or-try-restart was documented to be a NOP if the unit is not running, since the previous commits this is
also implemented. The old name suggests that the "try" logic only applies to restarting. Fix this, by moving the "try-"
to the front, to indicate that the whole option is a NOP if the service isn't running. |
b430f85f22ac23720b30263bd6cb252bb85ecc4b |
|
28-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: don't make up unit states, and don't eat up errors to eagerly
When checking a unit's state, don't ignore errors too eagerly, but generate proper error messages. Also, don't
synthesize an "unknown" state on error, but let the operation file. If a unit file isn't loaded treat this as
"inactive" as that's effectively what it means. |
6233b9023b18148b2553b4d4fba246701b55916e |
|
28-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: don't mangle unit names in check_unit_generic()
As it turns out all callers of check_unit_generic() already mangle unit names, or get the unit names directly from PID
1 (and hence arein normalized form anyway), hence there's no point in mangling then... |
1b53f64b001d2a8acb398eb8d546ec4570c1f235 |
|
27-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: piece-meal strv extension is expensive
If we have many entries to add to an strv we really should try to be smarter than constantly realloc()ing the strv
array. Instead, grow it exponentially. |
d60f6ad0cb690d920b8acbfb545bad29554609f1 |
|
25-Jan-2016 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: is-active/failed should return 0 if at least one unit is in given state
Previously we have return the not-found code, in the case that we found a
unit which does not belong to set active (resp. failed), which is the
opposite than what is written in man page. |
1e524ec6e2031629fec27906423619e3403b2f3e |
|
22-Jan-2016 |
Douglas Christman <DouglasChristman@gmail.com> |
systemctl: Allow 'edit' and 'cat' on unloaded units
Don't fail if the unit has a LoadError; otherwise `systemctl edit` cannot be
used to correct the error (e.g. multiple "ExecStart=" lines).
Remove file changed warning so cat output isn't interspersed with log messages.
Fixes #829 |
40c9fe4c0862114dab390c8ed16f78cf056b9140 |
|
20-Jan-2016 |
Jan Synacek <jsynacek@redhat.com> |
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
... to determine if color output should be enabled. If the variable is not set,
fall back to using on_tty(). Also, rewrite existing code to use
colors_enabled() where appropriate. |
10ba4835042c9815a755f8faa774651ec3d52467 |
|
14-Jan-2016 |
WaLyong Cho <walyong.cho@samsung.com> |
bus-util: print "systemctl --user" on user service manager
When a unit was started with "systemctl --user" and it failed, error
messages is printed as "systemctl status". But it should be "systemctl
--user status". |
4b2e9cfcf0dffec9d990000ee1555e49a9049246 |
|
13-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
systemctl: improve wording of "systemctl enable" messages
Closes: #2299 |
ee87525c5eeacf3ce8fb730bcd3658e8da085046 |
|
02-Dec-2015 |
Franck Bui <fbui@suse.com> |
core: use bus_unit_check_load_state() in transaction_add_job_and_dependencies() |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
bf4095801958ffd3ffaec219198f3aba5a484206 |
|
22-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: do not return uninitialized r
Regresssed during port to extract_first_word in
5ab22f3321d238957c03dcc6a6db76491e3989b8
CID #1338060 |
45090bf2ff43217116fc2497b4442320dffabf86 |
|
18-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: open pager for 'status', since process tree can get very long |
055ef36bc83050b12bda61697bc5e8980fcfdacc |
|
18-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make sure 'status' shows whether units are transient |
f32b43bda454a70ae23d6802605d41b26dc24ce2 |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: remove support for RequiresOverridable= and RequisiteOverridable=
As discussed at systemd.conf 2015 and on also raised on the ML:
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034880.html
This removes the two XyzOverridable= unit dependencies, that were
basically never used, and do not enhance user experience in any way.
Most folks looking for the functionality this provides probably opt for
the "ignore-dependencies" job mode, and that's probably a good idea.
Hence, let's simplify systemd's dependency engine and remove these two
dependency types (and their inverses).
The unit file parser and the dbus property parser will now redirect
the settings/properties to result in an equivalent non-overridable
dependency. In the case of the unit file parser we generate a warning,
to inform the user.
The dbus properties for this unit type stay available on the unit
objects, but they are now hidden from usual introspection and will
always return the empty list when queried.
This should provide enough compatibility for the few unit files that
actually ever made use of this. |
0ec0deaa30d0e68430f03fa6f32affa576481d18 |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
install: follow unit file symlinks in /usr, but not /etc when looking for [Install] data
Some distributions use alias unit files via symlinks in /usr to cover
for legacy service names. With this change we'll allow "systemctl
enable" on such aliases.
Previously, our rule was that symlinks are user configuration that
"systemctl enable" + "systemctl disable" creates and removes, while unit
files is where the instructions to do so are store. As a result of the
rule we'd never read install information through symlinks, since that
would mix enablement state with installation instructions.
Now, the new rule is that only symlinks inside of /etc are
configuration. Unit files, and symlinks in /usr are now valid for
installation instructions.
This patch is quite a rework of the whole install logic, and makes the
following addional changes:
- Adds a complete test "test-instal-root" that tests the install logic
pretty comprehensively.
- Never uses canonicalize_file_name(), because that's incompatible with
operation relative to a specific root directory.
- unit_file_get_state() is reworked to return a proper error, and
returns the state in a call-by-ref parameter. This cleans up confusion
between the enum type and errno-like errors.
- The new logic puts a limit on how long to follow unit file symlinks:
it will do so only for 64 steps at max.
- The InstallContext object's fields are renamed to will_process and
has_processed (will_install and has_installed) since they are also
used for deinstallation and all kinds of other operations.
- The root directory is always verified before use.
- install.c is reordered to place the exported functions together.
- Stricter rules are followed when traversing symlinks: the unit suffix
must say identical, and it's not allowed to link between regular units
and templated units.
- Various modernizations
- The "invalid" unit file state has been renamed to "bad", in order to
avoid confusion between UNIT_FILE_INVALID and
_UNIT_FILE_STATE_INVALID. Given that the state should normally not be
seen and is not documented this should not be a problematic change.
The new name is now documented however.
Fixes #1375, #1718, #1706 |
d073dea0a89c271fc4a769d5b3b2db395aa0239a |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
install: never log from install functions
Instead, let the caller do that. Fix this by moving masked unit messages
into the caller, by returning a clear error code (ESHUTDOWN) by which
this may be detected. |
91d0f17e03e3975cac95c418e101f5266b56e897 |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make sure list-jobs doesn't return failure on success |
404f08d341c6fcd5f28664902adefd069f2082cd |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add a comment that clarifies why we do "return r" at the end of main()
To avoid confusion as outlined in #1845. |
9eb4a5012cbc23146078db7f5536ee3a68a249bb |
|
11-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
Revert "systemctl: return EXIT_SUCCESS on success"
This reverts commit 6a32563caa883bd11da1b255c38358e481c42ad7. |
6a32563caa883bd11da1b255c38358e481c42ad7 |
|
11-Nov-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
systemctl: return EXIT_SUCCESS on success |
36b4a7ba555540edb7648e0f97019280b4ac38de |
|
11-Nov-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove snapshot unit type
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 |
75fbd19388badbdd68f7e4e0ae0f723501629c86 |
|
11-Nov-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
systemctl: fix cancel
http://www.freedesktop.org/software/systemd/man/systemctl.html#cancel%20JOB...
> If no job ID is specified, cancel all pending jobs |
5ab22f3321d238957c03dcc6a6db76491e3989b8 |
|
02-Nov-2015 |
Susant Sahani <ssahani@gmail.com> |
systemctl: port to extract_first_word |
b41b9d2ae9d1139a3d4d5eb7ad7b100ffa3ee6db |
|
31-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add a way to explicitly request client-side unit installing
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. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
7d50b32a129e781401cf897475f388f682de1368 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out globbing related calls into glob-util.[ch] |
7f4b3c5ea39957231839421f2d3a65f5a18e4083 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move running_in_chroot() into virt.[ch]
It's a very weak kind of virtualization, after all. |
8752c5752f3b9023f9ce96a55d70c6e5fc31118f |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move more locale-related calls to locale-util.[ch] |
8fcde01280adcbd07e8205b91ac52b06305b6208 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] |
f4f15635ec05293ffcc83a5b39f624bbabbd8fd0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move a number of fs operations into fs-util.[ch] |
78f22b973fa2c9b09bd974680836df17163d9ee0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out resource limits related calls into rlimit-util.[ch] |
5f311f8c0e51e2f13773823feb6a71f7c6f2838c |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util: remove path_get_parent(), in favour of dirname_malloc()
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]. |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out user/group/uid/gid calls into user-util.[ch] |
c004493cdefc1f43a3956ca529e8070f8d70be56 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out IO related calls to io-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
0f03c2a4c093e3d44f4072144827e943c05c8904 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
path-util: unify how we process paths specified on the command line
Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so. |
5b7481633fba100cc184c367825d2e3829bc1d88 |
|
22-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: the various list commands actually can take any number of arguments
I accidentally broke this a while back when I ported systemctl to the
verbs logic.
Add support for this back. |
7e9d36e06b85d87eb2c3aed507fe3aa1574c7880 |
|
01-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: fix how we decode types and states
There was a bad memory access among other smaller issues. |
bc6c18fef106ca53a975968df298bce339490214 |
|
30-Sep-2015 |
reverendhomer <mk.43.ecko@gmail.com> |
systemctl: fix memory leak in systemctl_parse_argv
This commit fixes Coverity #1325228 |
7bbb5359c0a23061c9bd40e6f7c2a0afbf2906f8 |
|
30-Sep-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not set variable to be immediately overwritten |
a4420f7b8ed73b05ef6f31622101e7804daef69f |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when reading legacy -t argument for shutdown, don't drop following parameter
We currently completely ignore the following parameter, but we really
should not, as that is actually the time to shut down on. |
45519fd6304aae453d95c6cf11bfc8539c38494c |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: various modernizations |
5cfee41459d54e13fd61238a0440cd4453421ed6 |
|
30-Sep-2015 |
Daniel Mack <daniel@zonque.org> |
tree-wide: use strempty() where possible
Also add a Coccinell patch to detect such locations in the future. |
7f96539d45028650f2ba9452095473a9c455d84b |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when a shutdown is scheduled, always go via logind |
19578bb26b10b766227cff4d5962521952aac369 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: minor modernizations |
e449de87776877dc59d6662fda08621d15a19eff |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: port verb dispatching to generic verbs.[ch] code
Let's parse the command line the same way in our various tools. |
7089051f67e969a524bde5a7f264491a0373f7e5 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: prefer shutting down through logind even as root
Otherwise, wall messages will not be generated for root. |
57ab90065d550b5f86e67f5d9ebc40f8a4c1297d |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: split out code invoking SetExitCode() into function of its own |
4057e12315ae4ce2325b68c0b65cf23ccbe4de55 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: don't assert on the arguments array unnecessarily
In most verbs it's fine to treat the arguments array being NULL is empty
array, hence do so. |
14b316ebf81fd21adade2fa6d2f48cc421dc5d95 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make use of strv_skip() where appropriate |
691395d84c27fea079513631b2e3b2f00b2107d6 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make use of log_error_errno() where we can
Also adds a couple of "return" statements, where they are missing. |
4fbd7192c5058d73c8aa408c21428dd554ac1cea |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: rework how we connect to busses
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). |
266f3e269d173f104aa2a5e3ceac9b6979ea5039 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
bus-util: rename bus_open_transport() to bus_connect_transport()
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. |
2cc7b0a25f7307a50fdad38ee4a2c6b9d856fff9 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: rename parse_time_spec() to parse_shutdown_time_spec()
Let's clarify that this function is specific to shutdown time
specifications, nothing else. |
eca830bee94e2cd24add44a5aa5c1836f54da27a |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: conditionalize /dev/initctl fallback on HAVE_SYSV_COMPAT |
172d7abfea003d84d0e697a510a222f32b40f4c0 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: allocate arg_wall only on the heap
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. |
fc2ffaf17d69fbe58183b2bdd61a655d575d8b0f |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add 'const' where appropriate |
48ec22bc02921ae6324f5ec1373244437fb4a6fb |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: remove client-side wall message support
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. |
e3ead6bb42f7c0f18d0ac100d33b71913fe4dcca |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: move strv_skip_first() out of systemctl.c
Make it generic, call it strv_skip() and move it to strv.[ch] |
56a730fa568f6ad168cb77ed46e57c042325eedb |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: split out code that schedules shutdowsn into its own function |
2cf05793f20adeff6da949f86cd502adb402cca2 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: rename all logind-specific functions to logind_xyz() |
949d9ce954ab78f6d3922ad7a51cce20332129e0 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: move shutdown cancelling code into its own function
Let's make sure the main switch statement only invokes functions, but
doesn't do anything real on its own. |
4f16c1f479ac3d790933ca196075cba333bab387 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: don't special case ACTION_RUNLEVEL anymore
Let's move its dispatching to the main switch statement. |
f2d11d35e90d5143d2bc6103ff451778909644f0 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: introduce a single function to set the wall message
Let's not have the same code three times, but reduce it to one function. |
94f099d8132da7987a5dbe930dadf31aaded9a11 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make "systemctl is-system-running" return "offline" if we are not booted with systemd
This sounds like the better place to expose this than in "systemd-notify
--booted".
Also document the so far undocumented "unknown" state the command might
return. And rearrange the table of states documented to be more like the
one for "is-running".
Also, don't document the precise exit code of this function, just say
errors are reported != 0 or > 0... |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
7e55de3b9648a47286a9b49253f95b1e0d65287a |
|
28-Sep-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Move all unit states to basic/ and extend systemctl --state=help |
e16972e6265d5e9326ec21d7e90f715989f96548 |
|
28-Sep-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: add --state=help
This mirrors --type=help and simplifies completion scripts.
The array of states is dense, so the is no need to check if the string is null. |
1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect. |
fa2f8973adf9cfb6cc2a69bcfe209b125ee3a3ce |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: introduce new sd_bus_default_flush_close() call
If code enqueues a message on one of the default busses, but doesn't
sync on it, and immediately drops the reference to the bus again, it
will stay queued and consume memory. Intrdouce a new call
sd_bus_default_flush_close() that can be invoked at the end of programs
(or threads) and flushes out all unsent messages on any of the default
busses. |
287419c119ef961db487a281162ab037eba70c61 |
|
21-Sep-2015 |
Alban Crequy <alban.crequy@gmail.com> |
containers: systemd exits with non-zero code
When a systemd service running in a container exits with a non-zero
code, it can be useful to terminate the container immediately and get
the exit code back to the host, when systemd-nspawn returns. This was
not possible to do. This patch adds the following to make it possible:
- Add a read-only "ExitCode" property on PID 1's "Manager" bus object.
By default, it is 0 so the behaviour stays the same as previously.
- Add a method "SetExitCode" on the same object. The method fails when
called on baremetal: it is only allowed in containers or in user
session.
- Add support in systemctl to call "systemctl exit 42". It reuses the
existing code for user session.
- Add exit.target and systemd-exit.service to the system instance.
- Change main() to actually call systemd-shutdown to exit() with the
correct value.
- Add verb 'exit' in systemd-shutdown with parameter --exit-code
- Update systemctl manpage.
I used the following to test it:
| $ sudo rkt --debug --insecure-skip-verify run \
| --mds-register=false --local docker://busybox \
| --exec=/bin/chroot -- /proc/1/root \
| systemctl --force exit 42
| ...
| Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42.
| $ echo $?
| 42
Fixes https://github.com/systemd/systemd/issues/1290 |
ac5e3a505e49c80b56c971a8fc13bacac961640d |
|
21-Sep-2015 |
Jan Synacek <jsynacek@redhat.com> |
core: extend KillUnit() to return error when no unit was killed |
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8f |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add support for the "pids" cgroup controller
This adds support for the new "pids" cgroup controller of 4.3 kernels.
It allows accounting the number of tasks in a cgroup and enforcing
limits on it.
This adds two new setting TasksAccounting= and TasksMax= to each unit,
as well as a gloabl option DefaultTasksAccounting=.
This also updated "cgtop" to optionally make use of the new
kernel-provided accounting.
systemctl has been updated to show the number of tasks for each service
if it is available.
This patch also adds correct support for undoing memory limits for units
using a MemoryLimit=infinity syntax. We do the same for TasksMax= now
and hence keep things in sync here. |
59f448cf15f94bc5ebfd5b254de6f2441d02fbec |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: never use the off_t unless glibc makes us use it
off_t is a really weird type as it is usually 64bit these days (at least
in sane programs), but could theoretically be 32bit. We don't support
off_t as 32bit builds though, but still constantly deal with safely
converting from off_t to other types and back for no point.
Hence, never use the type anymore. Always use uint64_t instead. This has
various benefits, including that we can expose these values directly as
D-Bus properties, and also that the values parse the same in all cases. |
1143adf722c6c41cc3ea110979069aac12284d7d |
|
10-Sep-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
systemctl: add RequisiteOf* as inverses of Requisite and RequisiteOverridable |
58158dc765b4ee7089ef9fd2405c48497acf5435 |
|
10-Sep-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: improve clarity of error messages in the logind path |
2ac3930f5b5fb06c7bd959c2ea8667554fceccfe |
|
10-Sep-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: relax permission checks in halt_main()
Thus we allow (non-interactive) polkit auth to kick in for legacy commands
(halt, poweroff, reboot, telinit) as well.
Fixes (another aspect of) issue #213. |
a9085ea35628fa0bfeb3b48fb53f7b823081ad09 |
|
10-Sep-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: fix logind bus call error handling in halt_main()
Handle -EOPNOTSUPP and -EINPROGRESS like in start_special(). |
4c315c2c7c859df318f70e7aa59697a6781c92aa |
|
10-Sep-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: minor: use IN_SET() instead of repeated equality checks. |
16f017fa6e3417edb4bba5db13a623f7289a3abc |
|
10-Sep-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: legacy tools shall never be interactive
Fixes (the main concern of) issue #213. |
7681f5b88907f5bc01405ee7607d4c3702f1c65f |
|
09-Sep-2015 |
Daniel Mack <daniel@zonque.org> |
systemctl: add dry-run support for scheduled shutdowns
Prefix the action parameter with "dry-" in case the --dry-run command
line switch was passed. |
ece174c5439021e32ebcc858842de9586072c006 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: drop {} from one-line if blocks
Patch via coccinelle. |
fb30c438f383c086f9b1a490a3d9125c4b2ea0b3 |
|
08-Sep-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
systemctl: add ConsistsOf as the inverse of PartOf |
4c3e8e39ea1316863e55afa41b6431d7cef38a9c |
|
07-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: a number of cleanups regarding error handling in systemctl |
6f883237f1b8a96ec0ea354866e033b6fcea9506 |
|
01-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgroup: drop "ignore_self" argument from cg_is_empty()
In all cases where the function (or cg_is_empty_recursive()) ignoring
the calling process is actually wrong, as a process keeps a cgroup busy
regardless if its the current one or another. Hence, let's simplify
things and drop the "ignore_self" parameter. |
37a0d5bf212df5b45ded449f4adaefd737df058b |
|
25-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
Revert "systemctl: properly handle empty control group paths in "status""
This reverts commit b04c25f9ef6359ed0ae403bdbfe4df840aba0f58. |
9ef15026c0e7e6600372056c43442c99ec53746e |
|
25-Aug-2015 |
Jan Synacek <jsynacek@redhat.com> |
logind/systemctl: introduce SetWallMessage and --message
Enable unprivileged users to set wall message on a shutdown
operation. When the message is set via the --message option,
it is logged together with the default shutdown message.
$ systemctl reboot --message "Applied kernel updates."
$ journalctl -b -1
...
systemd-logind[27]: System is rebooting. (Applied kernel updates.)
... |
b04c25f9ef6359ed0ae403bdbfe4df840aba0f58 |
|
24-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: properly handle empty control group paths in "status"
When showing the status of the "-.slice" slice root unit (whose reported
cgroup path is ""), we suppressed the cgroup tree so far, because
skipped it for all unit with an empty cgroup path. Let's fix that, and
properly handle the empty cgroup path. |
98d52feb9681d8e281addc1c907fc30a19b50105 |
|
12-Aug-2015 |
Thomas Blume <Thomas.Blume@suse.com> |
support reboot -f for kexec kernel
Fix error message:
-->--
Code should not be reached 'Unknown action.' at
src/systemctl/systemctl.c:6382, function halt_now(). Aborting.
Aborted
--<--
when executing 'reboot -f' from a system running a kexec kernel. |
97b11eedff9d2e17101ad453caf9e48b73246719 |
|
31-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar); |
03976f7b4a84b8b1492a549a3470b2bba8f37008 |
|
03-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: introduce new sd_bus_flush_close_unref() call
sd_bus_flush_close_unref() is a call that simply combines sd_bus_flush()
(which writes all unwritten messages out) + sd_bus_close() (which
terminates the connection, releasing all unread messages) +
sd_bus_unref() (which frees the connection).
The combination of this call is used pretty frequently in systemd tools
right before exiting, and should also be relevant for most external
clients, and is hence useful to cover in a call of its own.
Previously the combination of the three calls was already done in the
_cleanup_bus_close_unref_ macro, but this was only available internally.
Also see #327 |
9ef5d8f2cb1ea25eb83d741dfd8a9d393757b6db |
|
18-Jun-2015 |
Jan Synacek <jsynacek@redhat.com> |
systemctl: fix edit when EDITOR contains arguments
Correctly support cases when the EDITOR environment variable and friends
also contain arguments. For example, to run emacs in terminal only, one
can say:
EDITOR="emacs -nw" systemctl edit myservice |
5cb14b3742038b28551b161635a0cba3559404b2 |
|
16-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: actually make use of DUAL_TIMESTAMP_NULL macro
Let's use it as initializer where appropriate. |
14bcf25c8b94b5c3556ba3983028a2b35ed0572f |
|
15-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
util: when creating temporary file names, allow including extra id string in it
This adds a "char *extra" parameter to tempfn_xxxxxx(), tempfn_random(),
tempfn_ranomd_child(). If non-NULL this string is included in the middle
of the newly created file name. This is useful for being able to
distuingish the kind of temporary file when we see one.
This also adds tests for the three call.
For now, we don't make use of this at all, but port all users over. |
e7e55dbdc38f929805ab2407fbd50886043a9e7c |
|
14-Jun-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: fix memory leaks in users of bus_map_all_properties()
If you use bus_map_all_properties(), you must be aware that it might
touch output variables even though it may fail. This is, because we parse
many different bus-properties and cannot tell how to clean them up, in
case we fail deep down in the parser.
Fix all callers of bus_map_all_properties() to correctly cleanup any
context structures at all times. |
ce30c8dcb41dfe9264f79f30c7f51c0e74576638 |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a
death signal.
Also, ignore the result of the reset operations explicitly by casting
them to (void). |
9391a1c3d6c94c478b0016a81df3f874fd99260e |
|
03-Jun-2015 |
Michael Biebl <biebl@debian.org> |
systemctl: Use /usr/bin/editor if available
If the EDITOR environment variable is not set, the Debian policy
recommends to use the /usr/bin/editor program as default editor.
This file is managed via the dpkg alternatives mechanism and typically
used in Debian/Ubuntu and derivatives to configure the default editor.
See section 11.4 of the Debian policy [1].
Therefor prefer /usr/bin/editor over specific editors if available.
[1] https://www.debian.org/doc/debian-policy/ch-customized-programs.html |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
355ff449007df8be192ac316ab314599f56b2241 |
|
28-May-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
systemctl: Don't skip SysV init.d scripts when enabling/disabling units
If there is both a SysV init.d script and a systemd unit for a given name, we
want to do the same enable/disable operation for both, instead of just on the
systemd unit. This keeps the enablement status in sync so that switching init
systems behaves as expected. |
0f0467e63b0e0688ae9edb1512c1a2637d62ddb4 |
|
28-May-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
systemctl: drop hardcoded chkconfig invocation
Introduce /usr/lib/systemd/systemd-sysv-install [--root=] <action> <name>
abstraction, replacing the direct calling of chkconfig. This allows
distributions to call their specific tools like update-rc.d without patching
systemd.
Ship systemd-sysv-install.SKELETON as an example for packagers how to implement
this.
Drop the --enable-chkconfig configure option.
Document this in README and point to it in NEWS. |
958b66ea16deddd794b3a52643bd44633e165ead |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split all hostname related calls into hostname-util.c |
57ab2eabb8f92fad5239c7d4492e9c6e23ee0678 |
|
15-May-2015 |
Jan Synacek <jsynacek@redhat.com> |
systemctl: introduce --now for enable, disable and mask
https://bugs.freedesktop.org/show_bug.cgi?id=42940 |
eacd8534257516e4fea049c7562f05349529c476 |
|
12-May-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: fix check for template units
A typo from 7410616c. We want to ignore EINVAL but only catch errors. |
b2c23da8cea1987a1a329f5a964d3299b7ca7890 |
|
11-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rename SystemdRunningAs to ManagerRunningAs
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. |
ff9b60f38bf68eba4a47cabff14547d92e083214 |
|
11-May-2015 |
Torstein Husebø <torstein@huseboe.net> |
treewide: Correct typos and spell plural of bus consistent |
cafbecf31ca615feaf5e5392b62c7511081abefd |
|
06-May-2015 |
Daniel Buch <boogiewasthere@gmail.com> |
systemctl: null-initialize pointer with cleanup attribute |
7410616cd9dbbec97cf98d75324da5cda2b2f7a2 |
|
06-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rework unit name validation and manipulation logic
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 |
d3a2a05329676098faa07529f369a19ed8710723 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
systemctl: kill newline characters from log_error_errno() calls
log_error_errno() already adds a newline, so drop them. |
f0efea232a582660b25ee992853c78cf825721b6 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
systemctl: talk to logind for scheduled shutdowns
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. |
99f710dde855f7ecb699ddac6ad77923c1f6bc85 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
shared/utmp-wtmp: add parameter for origin tty and callback userdata
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. |
40acc203c043fd419f3c045dc6f116c3a28411d8 |
|
15-Apr-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: avoid bumping NOFILE rlimit unless needed
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 |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
a4921cf4e2acde70eeaa0da8f040da6a058206b4 |
|
08-Apr-2015 |
Jan Janssen <medhefgo@web.de> |
systemctl: Use logind for --firmware-setup if possible |
5bdf22430e367799dfa66c724144b624c5479518 |
|
07-Apr-2015 |
Jan Janssen <medhefgo@web.de> |
logind,systemctl: add reboot to EFI firmware support |
15411c0cb1192799b37ec8f25d6f30e8d7292fc6 |
|
13-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses. |
2558691285b2f7b3078b43b26736fcadf3c6d194 |
|
07-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: remove dead check
r could never be less than zero.
CID #1271350. |
5ad096b3f1331b175340129a8c9a5a9d711e5415 |
|
02-Mar-2015 |
Lennart Poettering <lennart@poettering.net> |
core: expose consumed CPU time per unit
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. |
95d383ee47db488f182048cfd6846f2e6b859f2b |
|
24-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: bump NOFILE only for systemctl_main
It is not necessary when running as telinit, etc.
https://bugzilla.redhat.com/show_bug.cgi?id=1184712 |
8527b07be1c5211b50a1a6496585952857a25c73 |
|
24-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: support auditd.service better
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. |
d028e01814a405e83c400c60545785d35dba2a17 |
|
24-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: check validity of PID we received |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
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. |
d5d8429a12c4b1ef0dcd226c0904f00f4fa4898a |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: remove configurability of sysv runlevel to target mapping
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. |
6e646d22f6f9215de5ccb5e5edf450558c59fed1 |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: allow interactive authorization for all bus calls
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. |
1cfa9a4cbb41ef770614fa97961cc056a63c1b7c |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: let's make use of FOREACH_STRING() where we can |
2404701e679904979751816930101511d8ec5d49 |
|
16-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Transpose args in strv_fnmatch() to be more oo |
bceccd5ecc393c344ab008737ba6aab211a5ea9f |
|
16-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add helper for fnmatch over strv |
8744505aaefad761cba0f0e5afaaf6bcec53906e |
|
12-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused variable |
c31c4324c5120d9b38f8a5e39623c8242ee001e0 |
|
11-Feb-2015 |
Michael Olbrich <m.olbrich@pengutronix.de> |
systemctl: don't update the reboot parameter if none is given
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" |
dab2bce81ed3e97d059d56e66f560aa25d9c2d63 |
|
05-Feb-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: unit_find_paths(): unify error handling in two code pathes |
029009d4970b2871dafab5fcc9397abb335263c8 |
|
05-Feb-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: cat, edit: further polish error messages |
3e7eed8497098d1b09fd4ae1260c5242e16a8127 |
|
05-Feb-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: cat: fix error handling
- correctly check for local vs. remote transport
- return after receiving error from expand_names() |
b5e6a600327d4e92c9fe62b9d51648a9d459871e |
|
05-Feb-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
systemctl: cat, edit: improve unit load error reporting
- 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() |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
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. |
3e495a6651609d0a45b62aab5c3ed5a3b40e11ab |
|
29-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: refuse --host with cat
This might be fixed one day, but for now it's better to fail.
https://bugzilla.redhat.com/show_bug.cgi?id=1186952 |
b986229efe2cc96157aa14c37bab7843311bbef1 |
|
23-Jan-2015 |
Sangjung Woo <sangjung.woo@samsung.com> |
systemctl: bugfix for systemctl reboot command with argument
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. |
934277fe6a26ff2a4da37059c70d84ab6a700781 |
|
23-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add a property that shows the current memory usage of a unit
This is exposed the memory.usage_in_bytes cgroup property on the bus,
and makes "systemctl status" show it in its default output. |
1fa2f38f0f011010bf57522b42fcc168856a7003 |
|
22-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable.
Too bad. |
250ba6647bce6099b6cc029a63d43231b4fa3261 |
|
19-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not show dots with --plain
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. |
3fb90db2d6aa6eb7711dbccb34a07e3e7ae85c91 |
|
19-Jan-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: fix import-environment description, trim help to 80 cols |
86d81e502bf7f923e4bb9c30de85f04e3497c839 |
|
09-Jan-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
systemctl: add missing output modes to help message |
f2068bcce01db31cdc9422f44185f3b49c04d2ce |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machined: when cloning a raw disk image, also set the NOCOW flag |
b619ec8f83ee3f524dae1f4692b26731bbe68616 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
man: bring systemctl man page and --help text into the same order |
079dac08c6a2725ce6e5ed2afa3f03d057c999c6 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl,loginctl: start polkit agent for all polkit enabled operations |
8b0cc9a36c8f92f010f2e8465942d2cd7c580d78 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
machinectl: show most recent log output in "machinectl status", too |
3c7560019e623e6e0d03a860b4f19a3a8715feca |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
loginctl: show the 10 most recent log user/session log lines in "loginctl user-status" and "loginctl session-status" |
de45d726034f33afdb0a185e62fc61bf10a0acd2 |
|
08-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)
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 |
60d27f1916c90871c063819a6e7d586c7a663789 |
|
05-Jan-2015 |
Ivan Shapovalov <intelfx100@gmail.com> |
path-lookup, systemctl: export lookup_paths_init_from_scope() from shared/install.c and use it |
aba843317d8acc4634417becebaedcfe5805d49d |
|
05-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
systemctl: properly iterate through service array when dispatching to sysv
https://bugzilla.redhat.com/show_bug.cgi?id=1175734 |
a39b4bdd10fc15654db37459fe8235a3de1ad817 |
|
31-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not repeat hibernate/sleep attempts
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. |
d8f52ed25a9edce75fda5251c977b7898e33887e |
|
29-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add "enable" and "disable" verbs for enabling/disabling systemd-nspawn for containers
This is basically just a shortcut for "systemctl enable
systemd-nspawn@<foobar>.service", but does escaping. |
ebd011d95b61a86258dece9864f65b7c4af721c0 |
|
29-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machinectl: add new "start" verb to start a container as a service in nspawn |
de33fc625725d199629ed074d6278504deb23deb |
|
24-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()
Pretty much everywhere else we use the generic term "machine" when
referring to containers in API, so let's do though in sd-bus too. In
particular, since the concept of a "container" exists in sd-bus too, but
as part of the marshalling system. |
75836b9d2071aab978ee78d7d797126a18a32052 |
|
16-Dec-2014 |
Jan Synacek <jsynacek@redhat.com> |
systemctl: fix argument handling when invoked as "shutdown" |
bc854dc7cd051e1e5a6ebcca8084b07168051c6c |
|
16-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: refuse to edit runtime dropins when they already exist in /etc
The check for existing unit files and dropins is unified.
path_join() is updated to not insert duplicate separators. |
ad2a035820e0fca29e49816f735bec1fcdabf82a |
|
16-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: share path lookup between 'cat' and 'edit'
'systemctl cat' now works for templates too.
'systemctl edit' does not refuse to edit units that have changed on
disk. That restriction didn't seem useful, actually editing units that
have changed on disk before they are started is very reasonable.
'edit' with instances and templates works again:
Now:
$ build/systemctl edit getty@
Failed to copy /etc/systemd/system/getty@.service.d/override.conf to /etc/systemd/system/getty@.service.d/.override.confdff6290408c86369: Permission denied
$ build/systemctl edit getty@tty3
Failed to create directories for /etc/systemd/system/getty@tty3.service.d/override.conf: Permission denied
$ build/systemctl edit --full getty@tty3
Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@tty3.serviced3d175087e7e439b: Permission denied
Failed to create temporary file for /etc/systemd/system/getty@tty3.service: Permission denied
$ build/systemctl edit --full getty@
Failed to copy /usr/lib/systemd/system/getty@.service to /etc/systemd/system/.getty@.servicea3caad491c0f2f3d: Permission denied
Failed to create temporary file for /etc/systemd/system/getty@.service: Permission denied |
8df1850740f2b78407b856e32ba649a7037227d4 |
|
16-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: split out LookupPaths initialization |
33f6c497f3f2da15b94da9140f77aefac92e2866 |
|
16-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: move two functions up
No functional change. |
3f36991e00634026db3c603a10dfcb3af2c5b7b2 |
|
16-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: unify warning about unit files changed on disk |
5b013a2f67a5914d6e86e3914f40cf44a03da091 |
|
16-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not use -1 for return code
Also make the error messages more specific to give a hint to the user
how to solve the problem. |
0faacd470dfbd24f4c6504da6f04213aa05f9d19 |
|
15-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
unit: handle nicely of certain unit types are not supported on specific systems
Containers do not really support .device, .automount or .swap units;
Systems compiled without support for swap do not support .swap units;
Systems without kdbus do not support .busname units.
With this change attempts to start a unsupported unit types will result
in an immediate "unsupported" job result, which is a lot more
descriptive then before. Also, attempts to start device units in
containers will now immediately fail instead of causing jobs to be
enqueued that never go away. |
e9e310f8e99c63c764f71ed0c224ccd3cceb90c7 |
|
13-Dec-2014 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
systemctl: handle correctly template units for edit verb
Previously, if we provided getty@.service to systemctl edit it would
have failed when using the bus because it is an invalid unit name.
But it would have succeeded when searching in the filesystem.
Now, we check if we have a template, if we do we search in the
filesystem, if we don't have a templae and we can use the bus, we do.
Furthermore, if we provided getty@tty1.service it would not have worked
when searching the filesystem, but it would have worked with the bus.
So now, when using the filesystem we use the template name and not the
unit name, and the same when logging errors.
(Also did a refactoring to avoid a long function) |
7430ec6ac08f2c0416d9f806964c46b30f3862b2 |
|
12-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
copy: use btrfs reflinking only whe we know we copy full files |
ae6c3cc009a21df4b51851fb8fe3fde0b7d6d8f0 |
|
12-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
util: when using basename() for creating temporary files, verify the resulting name is actually valid
Also, rename filename_is_safe() to filename_is_valid(), since it
actually does a full validation for what the kernel will accept as file
name, it's not just a heuristic. |
f7340ab269828d917cd1281e33e6dd4fdfee67b3 |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
treewide: correct spacing near eol in code comments |
96aad8d15a324d0e956a4e5653a11a67b209b41a |
|
10-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common-errors.h
Stuff in src/shared/ should not use stuff from src/libsystemd/ really. |
a644abed54bd4a42ebe2c99af5cc621ffbaf6c55 |
|
10-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: fix invalid free when enabling sysv services fails
The error was introduced in v215-343-g60731f32f1 'systemctl: do not
bother to mutate state on error', by causing strv_free to attempt to
free a static string. Simplify the whole thing by always keeping the
array in valid state. |
553acb7b6b8d4f16a4747b1f978e8b7888fbfb2c |
|
10-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
treewide: sanitize loop_write
loop_write() didn't follow the usual systemd rules and returned status
partially in errno and required extensive checks from callers. Some of
the callers dealt with this properly, but many did not, treating
partial writes as successful. Simplify things by conforming to usual rules. |
8b5e2af10830d55b2032e6c79d0cd1f959bb5b7f |
|
06-Dec-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove duplicated includes |
652212b0c2b60b9ef9b2e24eae82401f880fa21a |
|
04-Dec-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: fix a leak |
d2dc52dbc45051faa6356213a537081084e9dda4 |
|
02-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show unit file preset state in "systemctl status" output" |
c09157eeeadf7b6810ca3b9ff7c180767e9a30b7 |
|
30-Nov-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: remove unused variable |
7d4fb3b1c5ec7a117bd5a36e4591819a64e00136 |
|
29-Nov-2014 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
systemctl: add edit verb
It helps editing units by either creating a drop-in file, like
/etc/systemd/system/my.service.d/override.conf, or by copying the
original unit from /usr/lib/systemd/ to /etc/systemd/ if the --full
option is specified.
It invokes an editor on temporary files related to the unit files and
if the editor exited successfully, then it renames the temporary files
to their original names (e.g. my.service or override.conf) and
daemon-reload is invoked.
If the temporary file is empty the modification is canceled.
See https://bugzilla.redhat.com/show_bug.cgi?id=906824 |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
f647962d64e844689f3e2acfce6102fc47e76df2 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: yet more log_*_errno + return simplifications
Using:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg;
print;'
$f
done
And a couple of manual whitespace fixups. |
e80733be33e52d8ab2f1ae845326d39c600f5612 |
|
28-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Revert "systemctl: append default suffix only if none present"
This reverts a chunk out of commit 5e03c6e3b517286bbd65b48d88f60e5b83721894
which was trying to pass NULL to the the '.service' default. Anyway,
it seems better to be explicit. |
5e03c6e3b517286bbd65b48d88f60e5b83721894 |
|
28-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: append default suffix only if none present
Simplify unit_name_mangle() and unit_name_mangle_with_suffix() to
always behave the same, and only append a suffix if there is no
type suffix. If a user says 'isolate blah.device' it is better to
return an error that the type cannot be isolated, than to try to
isolate blah.device.target. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
c469089cf647ac740c7dcf09c463d2907b6d00eb |
|
23-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: show BindsTo/BoundBy in list-dependencies
Suggested-by: Peter Mattern <matternp@arcor.de>
http://lists.freedesktop.org/archives/systemd-devel/2014-November/025437.html |
aedd4012f437a0b08c34f40a5bb97b6e615ac074 |
|
10-Nov-2014 |
Jan Synacek <jsynacek@redhat.com> |
shared/install: when unit contains only Also=, report 'indirect'
If a unit contains only Also=, with no Alias= or WantedBy=, it shouldn't
be reported as static. New 'indirect' status shall be introduced.
https://bugzilla.redhat.com/show_bug.cgi?id=864298 |
cda134ab1eac84f874aacf8e885a07112a7fd5ce |
|
07-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
copy: teach copy_bytes() sendfile() support, and then replace sendfile_full() by it |
4a3ad39957399c4a30fc472a804e72907ecaa4f9 |
|
06-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when invokes as "reboot -f", sync()
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too. |
59fccdc587bc179c1638916ee16a24099f94f81f |
|
06-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but fatal for a start job if not met |
fec1530e6b5b8d6dc352c7338010357126e84621 |
|
30-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: obey --state in list-unit-files |
6c71341aeecc3d092ed90f66e1b2c481b8e260ff |
|
30-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: let list-{units,unit-files } honour --type
The docs don't clarify what is expected, but I don't see any reason
why --type should be ignored.
Also restucture the compund conditions into separate clauses for
easier reading. |
342641fb47618b783aeb3cdb65733afdb85b2260 |
|
17-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: by default interactively ask for polkit authorization, if possible
Also, allow using --no-ask-password to turn off ineractive polkit
authorization. |
08073121d8171f8e6be27b0c80e2ec283064760e |
|
13-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when mangle unit names for the "isolate", suffix with ".target" rather than ".service" by default
After all, we set AllowIsolate exclusively for target units so far, and
this is more or less the only thing tht makes sense, hence also use
".target" as completion suffix by default. |
2fc9a280cc47f455e7dffd3c4321da3f8ab65a58 |
|
13-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: move unit action table closer to the functions that use them
All other static tables we placed next to the functions that access
them, so let's do this for the unit action table too. |
8c06592fa10c08d94f0841548516e72d08366e85 |
|
10-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: remove casts in formatting |
b923047d73f412be40ba162e0b664cff3c17a480 |
|
09-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: suggest -xe not -xn
https://bugzilla.redhat.com/show_bug.cgi?id=1150289 |
e94937df954451eb4aa63573f0d7404ed2db987e |
|
08-Oct-2014 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: add add-wants and add-requires verbs |
cc19881a694c26af2d941246f72221df7e76ee02 |
|
02-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: remove spurious newline |
48a2900c6612052149a1d0dd88aeacb99b49ce4d |
|
18-Sep-2014 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
systemctl: fix resource leak CID #1237747
..by simply moving the declaration of "unit" into the STRV_FOREACH
loop as suggested by Andreas. |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory. |
8e07fc41f86d41e68c5663b2a3c620a0adedcc11 |
|
31-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Quote unit names in suggested systemctl commandlines
The fact that unit names have to be quoted can be a bit surprising.
Show quotes in the hint commandline, but only after checking that this
is necessary, since quotes are visually heavy and usually not needed.
https://bugs.freedesktop.org/show_bug.cgi?id=82832 |
498cfc230af8f83675be2e92057956f1792969e4 |
|
26-Aug-2014 |
Sjoerd Simons <sjoerd.simons@collabora.co.uk> |
systemctl: Correct error message printed when bus_process_wait fails
Actually use the variable containing the return code of bus_process_wait when
printing the error message as a result of it failing. |
4fe1be9ce2e0cca6354a4167f0a1a7e1f943c91c |
|
21-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: in list-unit-files, always show legend, even if we know about no unit files |
fdbdf6ec29bda40763d7d3e7bb2a63e2f5d60c4c |
|
20-Aug-2014 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: fail in the case that no unit files were found
Previously systemctl died with message
-bash-4.2# systemctl --root /rawhi list-unit-files
(src/systemctl/systemctl.c:868) Out of memory.
in the case that no unit files were found in the --root
or the directory did not exist.
So lets return ENOENT in the case that --root does not exist
and empty list in the case that there are no unit files. |
8085f163c50d998f3e30a6ddfc72c73d5dc57747 |
|
14-Aug-2014 |
Dave Reisner <dreisner@archlinux.org> |
util: allow strappenda to take any number of args
This makes strappenda3 redundant, so we remove its usage and
definition. Add a few tests along the way for sanity. |
249968612f16a71df909d6e73785c18a9ff36a65 |
|
04-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
bus: always explicitly close bus from main programs
Since b5eca3a2059f9399d1dc52cbcf9698674c4b1cf0 we don't attempt to GC
busses anymore when unsent messages remain that keep their reference,
when they otherwise are not referenced anymore. This means that if we
explicitly want connections to go away, we need to close them.
With this change we will no do so explicitly wherver we connect to the
bus from a main program (and thus know when the bus connection should go
away), or when we create a private bus connection, that really should go
away after our use.
This fixes connection leaks in the NSS and PAM modules. |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there. |
b93312f5960b276bae915906ccde36f545bae3e0 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolve-host: list types and classes
Also update systemctl to similar style. |
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.
Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.
_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.
Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.
mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint
mbiebl_> which is pretty weird |
3a43da2832dc5360a638d043f469a6dcbe025582 |
|
29-Jul-2014 |
Kay Sievers <kay@vrfy.org> |
time-util: add and use USEC/NSEC_INFINIY |
0c6ea3a4e2ac3f350dcb58e8f08bb74b030cd624 |
|
26-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add utility function to append root to path |
60731f32f1d25070ed7559bdd64d65e7462a4df6 |
|
26-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not bother to mutate state on error
We will abort anyway. |
7de80bfe2e61d5818601ccfddbadad3b7703ed70 |
|
26-Jul-2014 |
Karel Zak <kzak@redhat.com> |
Always check asprintf return code
There is a small number of the places in sources where we don't check
asprintf() return code and assume that after error the function
returns NULL pointer via the first argument. That's wrong, after
error the content of pointer is undefined. |
78002a678106a9a4e0e9d747f54458ba84322f1a |
|
21-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd-verify: check man pages |
b7bbdabeb4a5b66fdbcdfed0d097109cfb39c43e |
|
08-Jul-2014 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: fix visual alignment for lines prefixed with color dots |
b4af5a803aa71a57733ca46fef29b7afb20a626c |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show StatusErrno value in "systemctl status" |
99813a19122932da2cf55fecaf06446dcf7989a2 |
|
25-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add new "is-system-running" command to check whether system is fully up
https://bugs.freedesktop.org/show_bug.cgi?id=66926 |
735a1a2ea5fb849e797c956bddf445a2a5bdf3d3 |
|
17-Jun-2014 |
Dave Reisner <dreisner@archlinux.org> |
systemctl: reverse order of args when verbosely creating symlinks
This was backwards. The symlink itself points to the source unit, not
the other way around. |
749ebb2da4933de68bfaa4d6f6ffd9e4692ee547 |
|
17-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: output human readable strings in "systemctl enable" and "systemctl disable" |
d309c1c36426f9a355e28e3c35153281939aeea6 |
|
17-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
install: beef up preset logic to limit to only enable or only disable, and do all-unit preset operations
The new "systemctl preset-all" command may now be used to put all
installed units back into the enable/disable state the vendor/admin
encoded in preset files.
Also, introduce "systemctl --preset-mode=enable-only" and "systemctl
--preset-mode=disable-only" to only apply the enable or only the disable
operations of a "systemctl preset" or "systemctl preset-all" operation.
"systemctl preset-all" implements this RFE:
https://bugzilla.redhat.com/show_bug.cgi?id=630174 |
cdc06ed7b6120c1049305fa7033f228ee9d86043 |
|
18-May-2014 |
David Strauss <david@davidstrauss.net> |
core: Filter by state behind the D-Bus API, not in the systemctl client. |
f1721625e7145977ba705e169580f2eb0002600c |
|
18-May-2014 |
Nis Martensen <nis.martensen@web.de> |
fix spelling of privilege |
4723e4b2a4ca7a7df449ab2377770301cce6abf7 |
|
17-May-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: more cleanup
This is followup on 05cae7f3431446236139434ee58a6275f3cb31e8
I think the intention was to use the newly introduced 'path'
variable in the inner loop instead of p. |
05cae7f3431446236139434ee58a6275f3cb31e8 |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: small cleanup |
de0671ee7fe465e108f62dcbbbe9366f81dd9e9a |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove unnecessary casts in printfs
No functional change expected :) |
12ed81d9c88406234c20e9261ae8c8b992d8bc4d |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Make systemctl --root look for files in the proper places
Running systemctl enable/disable/set-default/... with the --root
option under strace reveals that it accessed various files and
directories in the main fs, and not underneath the specified root.
This can lead to correct results only when the layout and
configuration in the container are identical, which often is not the
case. Fix this by adding the specified root to all file access
operations.
This patch does not handle some corner cases: symlinks which point
outside of the specified root might be interpreted differently than
they would be by the kernel if the specified root was the real root.
But systemctl does not create such symlinks by itself, and I think
this is enough of a corner case not to be worth the additional
complexity of reimplementing link chasing in systemd.
Also, simplify the code in a few places and remove an hypothetical
memory leak on error. |
19befb2d5fc087f96e40ddc432b2cc9385666209 |
|
15-May-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.
Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved). |
5bb75bc745557d5141066dee796b329507b0c634 |
|
10-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: return an error code is status fails
This got lost in the refactoring in f74294c1dabb4.
Also make sure that the return code corresponds to the *first* failure,
not the last.
https://lists.fedoraproject.org/pipermail/devel/2014-May/199080.html |
6b01f1d3911bd7c7eadbb8a3b4375bd3ac05c98f |
|
23-Apr-2014 |
Lennart Poettering <lennart@poettering.net> |
delta: draw arrows with draw_special_char()
Let's unify generation of unicode chars at one place.
Also, don't add an extra space into chars we print, except for the tree
chars where this is really necessary. |
c5220a940d00fc2520c702104939d0a4cf637254 |
|
21-Apr-2014 |
Michael Olbrich <m.olbrich@pengutronix.de> |
systemctl: delete REBOOT_PARAM_FILE if no parameter is specified
And move it to sperate function. |
a1484a216e79da1fa7e2323095fb1b7203fb7a17 |
|
17-Apr-2014 |
Djalal Harouni <tixxdz@opendz.org> |
systemctl: allow to change the default target without the --force switch
Currently "systemctl set-default" will fail to change the default target
due to the 'default.target' being a symlink which is always the case.
To work around this, the user must specify the "--force" switch to be
able to overwrite the existing symlink.
This is clearly a regression that was introduced by commit 718db96199e
since it worked before without the "--force" switch and the man pages do
not mention that you need to specify it. It is expected that this is a
symlink.
So just explicity set the force flag to make it work again.
https://bugs.freedesktop.org/show_bug.cgi?id=76623
Reported-by: <code@progandy.de> |
806a37e743a038c0fd0887c24c8b1b6914cb109d |
|
16-Apr-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: add --recursive for list-timers |
0cfc35257189d3d7c336fcbd01d18941c333cd6a |
|
16-Apr-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: add --recursive for list-sockets |
ca2d37841476e6272c9957c3f5a0cbe869a531ca |
|
12-Apr-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify GREEDY_REALLOC and GREEDY_REALLOC_T
greedy_realloc() and greedy_realloc0() now store the allocated
size as the count, not bytes.
Replace GREEDY_REALLOC uses with GREEDY_REALLOC_T everywhere,
and then rename GREEDY_REALLOC_T to GREEDY_REALLOC. It is just
too error-prone to have two slightly different macros which do the
same thing. |
b3ae710c251d0ce5cf2cef63208e325497b5e323 |
|
05-Apr-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: update NAME to PATTERN in help()
Previously the man page was modified, but not help(). |
93c941e3fb232da014a4b8050c960b63cb2bbf3d |
|
27-Mar-2014 |
Brandon Philips <brandon@ifup.co> |
systemctl: fix spelling in comment |
dedabea4b3d61a87cedb5c8d7ccce5b86ea84afe |
|
24-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
timer: support timers that can resume the system from suspend |
d784e2dbac20d7aa6c2da82d6267173b58c55df8 |
|
24-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show last trigger time in "systemctl list-timers" |
50933da01b71d3f5a0b869731fc41ce89881db69 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: sort local host entry before container in list-machines output |
90c3f79dc74229134818e78cb97d315e28ee93b5 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: prefix list-units and list-machines output with a circle indicating a failure state
(Subject to --no-legend) |
1238ee09b7babb175b9bf7ad1d0e8eb2a414ee6e |
|
17-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: introduce -r switch to show units running in local containers in addition to the host |
f8294e4175918117ca6c131720bcf287eadcd029 |
|
16-Mar-2014 |
Josh Triplett <josh@joshtriplett.org> |
Use strlen even for constant strings
GCC optimizes strlen("string constant") to a constant, even with -O0.
Thus, replace patterns like sizeof("string constant")-1 with
strlen("string constant") where possible, for clarity. In particular,
for expressions intended to add up the lengths of components going into
a string, this often makes it clearer that the expression counts the
trailing '\0' exactly once, by putting the +1 for the '\0' at the end of
the expression, rather than hidden in a sizeof in the middle of the
expression. |
9003d9b0d628be059922e522fd35f9c5b4d8b039 |
|
14-Mar-2014 |
Sebastian Thorarensen <sebth@naju.se> |
utmp-wtmp: allow overriding username on wall
utmp_wall() now takes an optional argument 'username_override' which
allows the caller to override the username shown on wall messages.
journald will use this to inform users that its wall messages comes from
'systemd-journald'. |
c3441de0613490a1f29d5f1fd0856e07e7c90b49 |
|
13-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: autopage always if systemctl status is invoked without args |
ea6c2dd1f819c3d481fc590849809aeb552c1d48 |
|
13-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: suppress duplicate newline if there's not log output in "systemctl status" |
15ef11449b31e2fc91f2172c8afedb20ecad5ae9 |
|
13-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: reorder verbs |
3df538da67091623044f00c2dbf488a194a689c6 |
|
13-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make sure status -a doesn't terminate too soon |
b0d14c69b2907798ffde32b49b4f28a90242dbb7 |
|
13-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show a colored red dot in "status" output indicating the state of a unit |
8fcf784dffba1ca24c2790b96c18dd689d4981fb |
|
12-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when "systemctl status" is called without arguments show a short overall system state
Previously "systemctl status" without argument would print the status of
all loaded units. This has now been moved to "systemctl status -a". |
0d292f5e7597a729365644edfbcdf2e5fac8beb4 |
|
12-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add new "list-machines" command
"systemctl list-machines" shows one line per local container which
includes the current system state of the container, the number of failed
units as well as the number of currently queued jobs. |
f39d4a08e746e703d562076a0f622eb91dbdcd3e |
|
11-Mar-2014 |
Harald Hoyer <harald@redhat.com> |
systemctl: for switch-root check, if we switch to a systemd init
If "systemctl switch-root" is called with a specific "INIT" or
/proc/cmdline contains "init=", then systemd would not serialize
itsself.
Let systemctl check, if the new init is in the standard systemd
installation path and if so, clear the INIT parameter,
to let systemd serialize itsself. |
df31a6c0fe07805cb50045fbe91c2a6e7e430562 |
|
05-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
systemd-run: add new --property= switch that can set arbitrary properties for the unit that is created
The code for parsing these properties is shared with "systemctl
set-property", which means all the resource control settings are
immediately available. |
6e18964d3a365567954fe10ddcfad74babdc427c |
|
04-Mar-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Introduce strv_consume which takes ownership
This mirrors set_consume and makes the common use a bit nicer. |
41a55c46ab8fb4ef6727434227071321fc762cce |
|
26-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Replace /var/run with /run in remaining places
/run was already used almost everywhere, fix the remaining places
for consistency. |
f5080e738512f92564e272d5dcbb357a1eceaa18 |
|
24-Feb-2014 |
Djalal Harouni <tixxdz@opendz.org> |
systemctl: move next elapse calculation to its own function |
5556b5fe41173107a67dbe875fbd916a46e52a02 |
|
23-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: clean up some confusing regarding SI decimal and IEC binary suffixes for sizes
According to Wikipedia it is customary to specify hardware metrics and
transfer speeds to the basis 1000 (SI decimal), while software metrics
and physical volatile memory (RAM) sizes to the basis 1024 (IEC binary).
So far we specified everything in IEC, let's fix that and be more
true to what's otherwise customary. Since we don't want to parse "Mi"
instead of "M" we document each time what the context used is. |
9e82ffa040448a8f800411c2230ad98ef0e57d9c |
|
21-Feb-2014 |
Daniel Mack <zonque@gmail.com> |
systemctl: fix compiler warning in list_timers()
get_next_elapse() will always fill 'next' with values when it
returns >= 0. Hence, the compiler is wrong about this warning.
Initialize 'next' nevertheless.
src/systemctl/systemctl.c: In function ‘list_timers’:
src/systemctl/systemctl.c:953:43: warning: ‘next.monotonic’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
converted = nw.realtime - (nw.monotonic - next.monotonic);
^
In file included from ./src/shared/log.h:30:0,
from src/systemctl/systemctl.c:46:
./src/shared/macro.h:137:38: warning: ‘next.realtime’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
_a < _b ? _a : _b; \
^
src/systemctl/systemctl.c:933:32: note: ‘next.realtime’ was declared here
dual_timestamp next;
^ |
151b9b9662a90455262ce575a8a8ae74bf4ff336 |
|
20-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
api: in constructor function calls, always put the returned object pointer first (or second)
Previously the returned object of constructor functions where sometimes
returned as last, sometimes as first and sometimes as second parameter.
Let's clean this up a bit. Here are the new rules:
1. The object the new object is derived from is put first, if there is any
2. The object we are creating will be returned in the next arguments
3. This is followed by any additional arguments
Rationale:
For functions that operate on an object we always put that object first.
Constructors should probably not be too different in this regard. Also,
if the additional parameters might want to use varargs which suggests to
put them last.
Note that this new scheme only applies to constructor functions, not to
all other functions. We do give a lot of freedom for those.
Note that this commit only changes the order of the new functions we
added, for old ones we accept the wrong order and leave it like that. |
31d5a60cae19025225eda458386e0692bec5eec4 |
|
19-Feb-2014 |
Maciej Wereski <m.wereski@partner.samsung.com> |
systemctl: remove erroneous return in runlevel_parse_argv() |
5a1aece58142023d407afae797bb0ffb05b34732 |
|
13-Feb-2014 |
Dave Reisner <dreisner@archlinux.org> |
systemctl: fix exit statuses from is-active/is-failed
This was inadvertantly disturbed in e3e0314b when glob support was
added. |
57183d117a1d6a96d71ce99d648beb0d2b36228d |
|
13-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: add SystemCallArchitectures= unit setting to allow disabling of non-native
architecture support for system calls
Also, turn system call filter bus properties into complex types instead
of concatenated strings. |
36e0e6311bb4df37385db19b5eca03973b26b5ff |
|
10-Feb-2014 |
Tom Gundersen <teg@jklm.no> |
includes: remove duplicate includes
Found by the new check-includes make target. |
67d6621059085963a2a908a3ea99ced3b0ca789e |
|
20-Jan-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: skip native unit file handling if sysv file handling already handled everything
Issue pointed out by Colin Guthrie. |
ac3efa8ac62b60261d6c101bc98831316523b07a |
|
15-Jan-2014 |
Lennart Poettering <lennart@poettering.net> |
systemctl: introduce new "import-environment" command
This may be used in graphical session start-up scripts to upload
environment variables such as $DISPLAY into the systemd manager easily. |
e3e45d4f82daa5cd85ba40dde9127df900096c0c |
|
05-Jan-2014 |
Simon Peeters <peeters.simon@gmail.com> |
strv: multiple cleanups
- turn strv_merge into strv_extend_strv.
appending strv b to the end of strv a instead of creating a new strv
- strv_append: remove in favor of strv_extend and strv_push.
- strv_remove: write slightly more elegant
- strv_remove_prefix: remove unused function
- strv_overlap: use strv_contains
- strv_printf: STRV_FOREACH handles NULL correctly |
39602c3905da5196987b4df744541295ada725ae |
|
04-Jan-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: improve readability on failed commands
Not long ago a failed command would print:
"Failed to start something.service: ..."
regardless of whether the command was to start/stop/restart/etc.
With e3e0314 this was improved to print the method used. E.g. for stopping:
"Failed to StopUnit something.service: ..."
This patch matches the method to a more human readable word. E.g:
"Failed to stop something.service: ..." |
984af580b3c3dda38ad6910703970e43d6300b54 |
|
27-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: remove unused variable |
f78e6385dc4cee0a1f399c4c89ebf823c108d447 |
|
26-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use enums to make it obvious what boolean params mean
Suggested-by: Russ Allbery <rra@debian.org> |
e3e0314b56012f7febc279d268f2cadc1fcc0f25 |
|
26-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: allow globbing in commands which take multiple unit names |
8d5ba5a946388c965632713f6c1abfb3acba17f7 |
|
26-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: drop uninteresting units immediately
Also properly free memory if list-unit-files --root=... is used. |
b65205466248531d52f9d6dba16195864b023d4a |
|
26-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: simplify start_unit |
58684be9a781be9797142bce442bbac6fb6a7738 |
|
23-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: also color filenames of drop-ins in cat |
373d32c9f4746d58cda8c62f4c70d2e0e7aae1af |
|
21-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: fix bad memory access when processing PIDs on the "systemctl status" command line |
a669d6226da35d8689898b57bcb6a449046e7a3c |
|
19-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemct: add empty line between units in cat |
c0fdf09885ce83cc7edc31f51b03ef284980dfa8 |
|
17-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: highlight filenames in cat |
c0ea486f6e14dcd12390fc674e4ee33426444a3a |
|
17-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: fix return value from cat |
999b600390a2dff43d3367119ad594b7c40ed50d |
|
16-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: properly initialize and free sd_bus_error in "systemctl cat"
We need to properly initialize all error structs before use and free
them after use.
Also, there's no point in flushing stdout if we output a \n anyway... |
815ebc540daf5cede58570bbeb0a4106e201c52e |
|
15-Dec-2013 |
Djalal Harouni <tixxdz@opendz.org> |
systemctl: add the --plain option to the help message |
04504f93d147b12687d0745e50923740b10138c5 |
|
09-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: fix 'is-enabled' |
d08e75edf9d44540d9744349fc0c47dfb4a7eec8 |
|
09-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: simplify argument parsing |
4f8f66cb4236783cd3cbee97fefc9aaa8469ac08 |
|
09-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Help output spring cleaning
Use [brackets] only for optional elements.
Use <optional> in XML sources. |
4c49ab0e7a7f9f14f4308476257cd3548d0b4694 |
|
07-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: fix and refactor wait_for_jobs
wait_for_jobs was ignoring the errors from the jobs stored in r.
It would only ever return whether the call to sd_bus_remove_filter
went ok. This patch changes it to return the first job related error
encountered. If a job related error is found, then the result of the
call to sd_bus_remove_filter is ignored.
wait_for_jobs was a bit hard to read so I split it up to avoid
the goto and deep nesting. |
d8fba7c6ccea5e60f31f329f481fb2cdf6907ce9 |
|
07-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: allow globbing in list-<whatever> commands
It is nicer to say 'systemctl list-units ssh\*' then to use grep,
because colouring is preserved and it is easier to match just against
the unit name. |
2b6bf07dd23bb467099d213c97b3875c5e453491 |
|
07-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Get rid of our reimplementation of basename
The only problem is that libgen.h #defines basename to point to it's
own broken implementation instead of the GNU one. This can be fixed
by #undefining basename. |
f4336098941f94d23f2f6c79bc8d055a0907c392 |
|
06-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: check the value from start_unit_one
introduced in f459b6025f9368116d8c410376546c157314c205 |
071066a5e509d0138fd2941f46eb60e0a07106bb |
|
04-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: make an always true assert static
Silences a warning i clang |
4fd944ec822414b743bc39de37a4751c729463d3 |
|
04-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: no need to fdopen stdout |
f168c27313e4d7b0aabee037dc9c78a5799f0597 |
|
03-Dec-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
trivial coding style clean ups
- Add space between if/for and the opening parentheses
- Place the opening brace on same line as the function (not for udev)
From the CODING_STYLE
Try to use this:
void foo() {
}
instead of this:
void foo()
{
} |
e4c0fbe50c9a4a26efa4ae2b2350215be29b8660 |
|
01-Dec-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not show SourcePath when FragmentPath cannot be found
Those files can be in a completely deferent format and also
arbitrarily long, and usually contain information about other
stuff. If we ever add SourceLine= or SourceLines= in addition
to SourcePath=, and can show the relevant information only, this
commit can be reverted. |
e93c33d4aadb41427f215d43545e7fadc6bcec6f |
|
01-Dec-2013 |
Shawn Landden <shawn@churchofgit.com> |
systemctl: add "systemctl cat" |
f74294c1dabb41faaaa0e03777f0dd33b979eed6 |
|
01-Dec-2013 |
Shawn Landden <shawn@churchofgit.com> |
systemctl: refactor show()
v2, don't leave in unused function |
cc3f2093f622c04d12d287689d37d861ded41360 |
|
26-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
systemctl: fix enable/disable reply handling |
4dc5b821ae737914499119e29811fc3346e3d97c |
|
26-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: replace the three job mode options by a single --job-mode= option
Also, expose the new "flush" job mode this way. |
d2bd639262a45ba4f686ab4a9555f2e8a0337d34 |
|
25-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: remove debug log message |
dbed408b8e07602c3169af79393b5a3fbd7036b1 |
|
25-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when status is called without arguments show pager |
dbc2c080debdc45683bc5534e327455d4fbbbea7 |
|
22-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: indicate in list-dependencies whether a unit is already running |
ebcf1f97de4f6b1580ae55eb56b1a3939fe6b602 |
|
21-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: rework message handlers to always take an error argument
Message handler callbacks can be simplified drastically if the
dispatcher automatically replies to method calls if errors are returned.
Thus: add an sd_bus_error argument to all message handlers. When we
dispatch a message handler and it returns negative or a set sd_bus_error
we send this as message error back to the client. This means errors
returned by handlers by default are given back to clients instead of
rippling all the way up to the event loop, which is desirable to make
things robust.
As a side-effect we can now easily turn the SELinux checks into normal
function calls, since the method call dispatcher will generate the right
error replies automatically now.
Also, make sure we always pass the error structure to all property and
method handlers as last argument to follow the usual style of passing
variables for return values as last argument. |
718db96199eb307751264e4163555662c9a389fa |
|
20-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: convert PID 1 to libsystemd-bus
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.
This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:
- Synthesizing of "Disconnected" messages when bus connections are
severed.
- Support for attaching multiple vtables for the same interface on the
same path.
This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.
As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information. |
4561be3a64534a911ee405ffb51950a624a0cd3f |
|
19-Nov-2013 |
Karel Zak <kzak@redhat.com> |
Remove duplicate includes |
d5d217eae1b3ba978c4ddd6a2ef2de4621329662 |
|
18-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused variables |
6ce774fd8068d291e85b94bc630358ce86491b36 |
|
13-Nov-2013 |
Mantas MikulÄ—nas <grawity@gmail.com> |
systemctl: honor --no-legend in 'list-jobs' |
c49b30a23583ff39daaa26696bcab478d2fee0bb |
|
12-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: rename sd_bus_send_with_reply_and_block() to sd_bus_call()
The call is one of the most important ones we expose, where we place
major emphasis on. We should make sure to give it a short, memorable
name. |
1823b86ebf955b737fb87372b211fa45ba799a48 |
|
11-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
systemctl: warning: ‘r’ may be used uninitialized in this function |
ad83b4c47cb5b48cfd0a14537cee0c830eec2b74 |
|
11-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: avoid unitialized access when showing 0 timers |
cbb76c29ccd1a639ada00425fa7cc408507f171d |
|
11-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add new "list-timers" command |
0a9776c23010512b9096508ff795d12da0f8fc2d |
|
10-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: make sure daemon-reload returns success
Also change sd_bus_message_exit_container to return -ENOENT
when not in a container, to make it easier to distinguish different
errors. |
852c1b4d297e5c36a47254fed44bf0a967d66a90 |
|
10-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: fix printing of individual properties |
477def8097245a124f8ff51d17415cf78cde691b |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
shutdown: unify handling of reboot() syscall a bit |
6d6d40c910e14de8b09db58833dd1f1d95c03169 |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: properly initialize column widths for list-jobs |
0d95178e49eaf70fce9882d2a1277a9cd3555f34 |
|
08-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
systemctl: rename 'listen'
src/systemctl/systemctl.c: In function ‘get_listening’:
src/systemctl/systemctl.c:535:25: warning: declaration of ‘listen’ shadows a global declaration [-Wshadow]
src/systemctl/systemctl.c: In function ‘list_sockets’:
src/systemctl/systemctl.c:690:44: warning: declaration of ‘listen’ shadows a global declaration [-Wshadow] |
4aa2beacb1f9996f0352ec4221f8ef47ae2b7c66 |
|
08-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
systemctl: fix "reboot" call |
41dd15e474accdeb643c8319e257e6414c1c498a |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: restore ability to directly connect to PID1 from systemctl |
a9616cd17fb0a57ac92d39e1ad261caa1039d7b1 |
|
08-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
systemctl: initialize variables |
7af5a806d12beec2f4e69ef0e69eb02b315916d7 |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: allow listing cgroups of containers |
cbc9fbd131b485f529715f13bdb2a82f1562d42c |
|
08-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: various cleanups |
f459b6025f9368116d8c410376546c157314c205 |
|
08-Nov-2013 |
Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
systemctl: port to libsystemd-bus |
c6581cc14f2d36b49c72542220a7ed9d33bb8944 |
|
08-Nov-2013 |
Michal Sekletar <msekleta@redhat.com> |
systemctl: return r instead of always returning 0 |
0d49cfa264e8afc52526cd0cd73b2309dff498b2 |
|
07-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: we show headers for list-units even when piped these days, hence do the same for list-jobs |
a1074881b43416018aef2fb8f62ef62f92f0bae7 |
|
07-Nov-2013 |
Mantas MikulÄ—nas <grawity@gmail.com> |
systemctl: make LOAD column width dynamic
Otherwise 'not-found' overflows into the ACTIVE column. |
37185ec80ad372907a2a9388735655a7334babb6 |
|
07-Nov-2013 |
WaLyong Cho <walyong.cho@samsung.com> |
Support additional argument in reboot
reboot syscall can be performed with an additional argument. In some
systems this functionality can be useful to modify the mode of the
next boot performed by the bootloader. |
eb9da376d76b48585b3b63b4f91903b54f7abd36 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
clients: unify how we invoke getopt_long()
Among other things this makes sure we always expose a --version command
and show it in the help texts. |
76fdc9669a639db042d0e8bf57f525f008495535 |
|
01-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: fix typo in help text |
fb15be839500c39f6c2f006f45306d439e1a7add |
|
27-Oct-2013 |
Daniel Buch <boogiewasthere@gmail.com> |
path_lookup: moved _cleanup_lookup_paths_free_ from install.c to path-lookup.h |
71fda00f320379f5cbee8e118848de98caaa229d |
|
14-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
list: make our list macros a bit easier to use by not requring type spec on each invocation
We can determine the list entry type via the typeof() gcc construct, and
so we should to make the macros much shorter to use. |
872c8faaf2009422a91d227ae0b5c6f04c9d2c69 |
|
13-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix write-only use of a few variables
Since the invention of read-only memory, write-only memory has been
considered deprecated. Where appropriate, either make use of the
value, or avoid writing it, to make it clear that it is not used. |
7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 |
|
13-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero. |
cbb13b2a538ece1c7ec3b210e2b36b47df2a13ea |
|
02-Oct-2013 |
Václav PavlÃn < <vpavlin@redhat.com> |
systemctl: fix name mangling for sysv units |
ba5ecfcdbb4a4aa05f5040f847c207fd0df5de4f |
|
01-Oct-2013 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
systemctl: remove legacy upstart compatibility |
68372da693edb69a0881698ba9d0893bfddc9435 |
|
27-Sep-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make sure set-property mangles unit names |
184ecaf79483bcaf818c7745c9e1c97bbb276111 |
|
19-Sep-2013 |
Dave Reisner <dreisner@archlinux.org> |
systemctl: Avoid ellipsizing when piping output |
ddca82aca08712a302cfabdbe59f73ee9ed3f73a |
|
17-Sep-2013 |
Lennart Poettering <lennart@poettering.net> |
cgroup: get rid of MemorySoftLimit=
The cgroup attribute memory.soft_limit_in_bytes is unlikely to stay
around in the kernel for good, so let's not expose it for now. We can
readd something like it later when the kernel guys decided on a final
API for this. |
6e869e18c07f4251390cbf215532635a85712a6a |
|
12-Sep-2013 |
Kay Sievers <kay@yik.fritz.box> |
shut up gcc complaining about freeing a const variable |
c1e784feb4756226f09a94feeed81a3c0d9aac5e |
|
12-Sep-2013 |
Michal Sekletar <msekleta@redhat.com> |
systemctl: process only signals for jobs we really wait for
wait_filter() callback shouldn't process JobRemove signals for arbitrary
jobs. It should only deal with signals for jobs which are included in
set of jobs we wait for. |
b8ab2dc6c9eb8d6c738524f2ab48931855e3a08a |
|
10-Sep-2013 |
Gao feng <gaofeng@cn.fujitsu.com> |
systemctl: show BlockIODeviceWeight for unit
We can use systemctl show unitname to show the BlockIODeviceWeight
of unit. |
7239c1707a69aff63425e8b6570cfabbd7386f61 |
|
10-Sep-2013 |
Gao feng <gaofeng@cn.fujitsu.com> |
systemcl: add support for setting BlockIODeviceWeight for unit
This patch allows user to set up BlockIODeviceWeight for unit
through systemctl. Such as
systemctl set-property sshd.service BlockIODeviceWeight="/dev/sda 100" |
670612567ba54808fea06c445c6f2a7ee2d58197 |
|
10-Sep-2013 |
Gao feng <gaofeng@cn.fujitsu.com> |
systemcl: add support for setting BlockIORead/WriteBandwidth for unit
This patch allows user to set up BlockIOReadBandwidth and BlockIOWriteBandwidth
for unit through systemctl. Such as
systemctl set-property sshd.service BlockIOReadBandwidth="/dev/sda 100000"
systemctl set-property sshd.service BlockIOWriteBandwidth="/dev/sda 200000" |
94e0bd7db1d7ca8ab7f738cdab1d014241f5b225 |
|
12-Aug-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: show hint about --full when lines don't fit |
f535088ef72a92533f2c4270d06289c89737fa2a |
|
09-Aug-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add missing newline to --help output |
0b5a519c89b5fb48ec7a3cfbd9c02283ae0f23ac |
|
04-Aug-2013 |
Daniel Schaal <farbing@web.de> |
systemd-delta: Only print colors when on a tty
This make systemd-delta follow the behaviour of systemctl
and journalctl.
https://bugs.freedesktop.org/show_bug.cgi?id=67656
[zj: unify color query methods between those three programs.] |
a521ae4a5657f5b779b3ffd7771cfba0ee4b1968 |
|
26-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: rearrange --help output a bit |
223ab9345d70e2ea8498b96ff07ee73c25ad18b4 |
|
26-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: remove "load" command
"systemctl load" has always been racy since the GC could hit any time,
before making use of the loaded unit. Very recent systemd will run GC
immeidately after all unit state changes which has the effect that the
the effect of "systemctl load" is completely gone now, so let's remove
the support for it in "systemctl" for good. |
a65615ca5d78be0dcd7d9c9b4a663fa75f758606 |
|
26-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: move set-log-level to systemd-analyze
"systemctl set-log-level" is a command for analysis and tracing hence
"systemd-analyze" should be the better home for it, thus allowing us to
make the overly large "systemctl" a bit smaller. |
9ea9d4cf1656075559fcd6aeceb9530714c87d5b |
|
26-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: move "dump" command from systemctl to systemd-analyze
It's an analysis command and its format is explicitly not covered by any
stability guarantees, hence move away from systemctl and into
systemd-analyze, minimizing the already large interface of systemctl a
bit.
This patch also adds auto-paging to the various systemd-analyze commands
where that makes sense |
83787333bd75f3fb5d2d844a5d5dbf68d93f7f3f |
|
19-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
man: update documentation of systemctl cgroup commands |
9b9b3d36b8ffe5b41c1455bffd44a9d11efc8aee |
|
18-Jul-2013 |
Maciej Wereski <m.wereski@partner.samsung.com> |
systemctl: option to list units by state
This allows to show only units with specified LOAD or SUB or ACTIVE state. |
52990c2e0eabd1c11280f553f858062d4165b92f |
|
18-Jul-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd,systemctl: export condition status and show failing condition
$ systemctl --user status hoohoo
hoohoo.service
Loaded: loaded (/home/zbyszek/.config/systemd/user/hoohoo.service; static)
Active: inactive (dead)
start condition failed at Tue 2013-06-25 18:08:42 EDT; 1s ago
ConditionPathExists=/tmp/hoo was not met
Full information is exported over D-Bus:
[(condition, trigger, negate, param, state),...]
where state is one of "failed" (<0), "untested" (0), "OK" (>0).
I've decided to use 0 for "untested", because it might be useful to
differentiate different types of failure later on, without breaking
compatibility.
systemctl shows the failing condition, if there was a non-trigger
failing condition, or says "none of the trigger conditions were met",
because there're often many trigger conditions, and they must all
fail for the condition to fail, so printing them all would consume
a lot of space, and bring unnecessary attention to something that is
quite low-level. |
2ce982f9b1a9f409b10fc4c0f3faa6b594b58df9 |
|
18-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: also highlight a load state of "not-found" as red
"not-found" is a recently added load state and was previously just a
special case of "error". Since it also indicates a load error we should
also highlight it red, the same way as "error" was treated before. |
66a69314941b5020f57cda943095413c40d677d8 |
|
12-Jul-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: remove unused variable |
042f9f5e5e76cf0e3cbfd009abd2add0366cdeca |
|
11-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show cgroup tree if cgroup is empty but has non-empty children
This makes sure "systemctl status user.slice" shows a nice cgroup tree
of all logged in users. |
d0ede8f1c555500dceebd3cc8a8e877ed1d89de6 |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: suppress error message when doing "systemctl daemon-reexec"
When we issue a reexecution request via the private socket we need to
expect a "Disconnected" in addition to "NoReply" when the connection is
terminated. |
94c01aeb1049a87435e046245b8e5d975b778c60 |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: suppress error messages when checking whether a unit needs to be reloaded |
286ca4852eb2efc5c8c405e585b4e886c538f538 |
|
03-Jul-2013 |
David Coppa <dcoppa@gmail.com> |
build-sys: rename LEGACY to NOLEGACY to better reflect meaning
https://bugs.freedesktop.org/show_bug.cgi?id=66542 |
e9c1ea9de87d4d508ac38ce87a2fa56e7529a91a |
|
03-Jul-2013 |
Jason St. John <jstjohn@purdue.edu> |
replace tabs with spaces in various files
The affected files in this patch had inconsistent use of tabs vs. spaces
for indentation, and this patch eliminates the stray tabs.
Also, the opening brace of sigchld_hdl() in activate.c was moved so the
opening braces are consistent throughout the file. |
fb6becb4436ae4078337011b2017ce294e7361cf |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: port over to use scopes+slices for all cgroup stuff
In order to prepare things for the single-writer cgroup scheme, let's
make logind use systemd's own primitives for cgroup management.
Every login user now gets his own private slice unit, in which his sessions
live in a scope unit each. Also, add user@$UID.service to the same
slice, and implicitly start it on first login. |
a00963a2e4e98c0e4ef477b63b70c5e71d65fdc1 |
|
01-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show per-unit cgroup tree correctly following the new property |
7041efe9600e569da6089c36d00fa3ff58e33178 |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
dbus: make DeviceAllow=/DevicePolicy= writable |
b42defe3b8ed3947d85db654a6cdb1b9999f394d |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
dbus: make more cgroup attributes runtime settable |
8e2af478402414f060bbc16e1b4bbe7de1779c13 |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus
properties, optionally with persistence.
This currently hooks this up only for three cgroup atributes, but this
brings the infrastructure to add more changable attributes.
This allows setting multiple attributes at once, and takes an array
rather than a dictionary of properties, in order to implement simple
resetting of lists using the same approach as when they are sourced from
unit files. This means, that list properties are appended to by this
call, unless they are first reset via assigning the empty list. |
4ad490007b70e6ac18d3cb04fa2ed92eba1451fa |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: general cgroup rework
Replace the very generic cgroup hookup with a much simpler one. With
this change only the high-level cgroup settings remain, the ability to
set arbitrary cgroup attributes is removed, so is support for adding
units to arbitrary cgroup controllers or setting arbitrary paths for
them (especially paths that are different for the various controllers).
This also introduces a new -.slice root slice, that is the parent of
system.slice and friends. This enables easy admin configuration of
root-level cgrouo properties.
This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in
/dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is
turned off by DevicePolicy=). |
3b05b8b3b503caf525fa72440a3f9f4bae75268b |
|
25-Jun-2013 |
Harald Hoyer <harald@redhat.com> |
systemctl: conform to LSB with the "status" return code
check for pid file existance before returning 1 |
175728c45fae8a2e1aa9d725ee2fbc7aa34e6dbf |
|
25-Jun-2013 |
Harald Hoyer <harald@redhat.com> |
systemctl: conform to LSB with the "status" return code
http://fedoraproject.org/wiki/Packaging:SysVInitScript#Exit_Codes_for_the_Status_Action
https://bugzilla.redhat.com/show_bug.cgi?id=975016 |
422fa6500a44a222b655cd218a658f8a4f34a768 |
|
20-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
cgls,loginctl,systemctl: fix -l
Fixup for 98a6e13 "journalctl,loginctl,systemctl,systemd-cgls: add -l
as alias for --full". |
a016b9228f338cb9b380ce7e00826ef462767d98 |
|
17-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.
Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.
Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree. |
98a6e132b5b85999f7e3dce158e826ffeecc1553 |
|
17-Jun-2013 |
Daniel Albers <daniel@lbe.rs> |
journalctl,loginctl,systemctl,systemd-cgls: add -l as alias for --full
https://bugs.freedesktop.org/show_bug.cgi?id=65850 |
7085053a437456ab87d726f3697002dd811fdf7a |
|
10-Jun-2013 |
Daniel Wallace <danielwallace@gtmanfred.com> |
Allow for the use of @ in remote host calls
Without this you have to use %40 with the -H flag because dbus doesn't
like the @ sign being unescaped. |
856323c9cb0ef368367126588d0b43b4846ab0d7 |
|
09-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: remove extra padding from status output
In 131601349 'systemctl: align all status fields to common column',
padding was calculated for 'ListenStream: ...', etc. Later on in
45a4f7233 'systemctl: tweak output of Listen: fields a bit' output
was changed to 'Listen: ... (stream)', but calculation didn't change.
Just remove the calculation, since now the result will be always 8,
and it it more important to have everything aligned to the widest
field ("Main-PID"), than to save a few columns, usually at most two
(e.g. "Listen").
Note: strlen is more natural, and is optimized to sizeof even
with -O0. |
3a256a12ad2f5b635d852d2b7068b1de30f8cf59 |
|
04-Jun-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: add missing verbs to help |
1058cbf2ad3d62d039f8f0be92d9d37777925a39 |
|
31-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: suggest 'systemctl daemon-reload' without --system
--system is default anyway, and some poor user might type 9
characters without needing to. |
76d5a71de99b6fe0ecc9bfd82ec641a5d408e191 |
|
31-May-2013 |
Václav PavlÃn < <vpavlin@redhat.com> |
systemctl: add command set-log-level
Command changes current log level |
99504dd4c13af7516a976fffc0f68e6f26d3faac |
|
31-May-2013 |
Václav PavlÃn < <vpavlin@redhat.com> |
systemctl: add commands set-default and get-default
systemctl set-default NAME links the default.target to the given unit,
get-default prints out the path to the currently set default target. |
3a05c0f96c88984b47ca2f77bbf67dd5048a47d8 |
|
23-May-2013 |
Václav PavlÃn < <vpavlin@redhat.com> |
systemctl: mangle names when avoiding dbus
Unit names were mangled in function enable_unit only when dbus was
used. This patch adds mangling also when the dbus is not in use.
This makes it possible to say e.g.:
systemctl --root=/path enable cups
without spelling cups.service out in full. |
571bfc6c56962dfc926e9bbc1600c511fc8565d1 |
|
21-May-2013 |
Mantas MikulÄ—nas <grawity@gmail.com> |
systemctl: honor "--no-legend" in 'list-sockets' |
e9dd0369e4b3fa05569521eb83ff8142e6dd9a7c |
|
04-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: use GREEDY_REALLOC in one more place |
5d0c05e5f417325e8505dde857a93a88eb7ebdc0 |
|
03-May-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: add --plain option to list-dependencies
This patch adds more script-friendly output for list-dependencies. |
44a6b1b68029833893f6e9cee35aa27a974038f6 |
|
03-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add __attribute__((const, pure, format)) in various places
I'm assuming that it's fine if a _const_ or _pure_ function
calls assert. It is assumed that the assert won't trigger,
and even if it does, it can only trigger on the first call
with a given set of parameters, and we don't care if the
compiler moves the order of calls. |
afba41995de65d8f378b138ea6d9804be32625a3 |
|
24-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: show reverse dependencies or before/after ordering
Also update completion scripts a bit. |
ef42202ac8ed27e7ff1fc90ef8bc2590046dff25 |
|
24-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add set_consume which always takes ownership
Freeing in error path is the common pattern with set_put(). |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
a5e4972c8956cecf35fa4780e1cfe7c378bfcba1 |
|
18-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: drop usage of "internally loaded modules"
I wouldn't know what "internally" is supposed to mean hear, and we use
this terminology in this context nowhere else, so let's drop this. |
4b6756a88dc67baf3d0fea34157660ef22bb229f |
|
17-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
systemctl:enable_sysv_units() more _cleanup_free_ |
87698625aaf08ab2411a54a4ac9878acd4b46772 |
|
17-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
systemctl: clarify usage of "--all" versus list-unit-files
Novice users might think, that
$ systemctl --all
is equal to
$ systemctl list-unit-files
https://bugzilla.redhat.com/show_bug.cgi?id=748512 |
82da66fb750c91f06e713ff23a5e5c57ff05c2a8 |
|
16-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: replace decimal_str_max() by a typesafe macro DECIMAL_STR_WIDTH()
DECIMAL_STR_WIDTH() now works on any numeric type, and is easier to
distingish from DECIMAL_STR_MAX().
This also replaces another manual implementaiton of ulog10 by this macro. |
ab06eef8101866dd1337c4759002f7360a9db416 |
|
15-Apr-2013 |
Anatol Pomozov <anatol.pomozov@gmail.com> |
Fix spelling errors using 'codespell' tool |
991f2a3932e831ccac609ba88f6e725b6c01acfe |
|
13-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: new verb 'list-sockets'
LISTEN UNIT ACTIVATES
/dev/initctl systemd-initctl.socket systemd-initctl.service
/dev/log systemd-journald.socket systemd-journald.service
...
[::]:19531 systemd-journal-gatewayd.socket systemd-journal-gatewayd.service
kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
17 sockets listed.
Pass --all to see loaded but inactive sockets, too. |
bcb161b0230fdd1faf9176f95fee76a7db6afd59 |
|
12-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
errno is positive
Make sure we compare errno against positive error codes.
The ones in hwclock.c and install.c can have an impact, the
rest are unlikely to be hit or in code that isn't widely
used.
Also check that errno > 0, to help gcc know that we are
returning a negative error code. |
0ad4e1a872e789c77828d4c4825a56241103650c |
|
12-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: show the name of failing unit in red
It makes it easier to pick out problematic unit
names from a long list. |
20b3f379cfd44e61dd1838a107f1d5363fab5b5d |
|
12-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: allow multiple arguments to --type
This mirrors --property, and is generally useful.
New functionality is used in bash completion.
In case of zsh completion, new functionality is less useful
because of caching. Nevertheless, zsh completion for restart
is made to behave more-or-less the same as bash completion.
At least sockets can be restarted. |
75add28aa17678fbf5b10947027efe7ac75d113d |
|
11-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: ellipsize job list only when necessary, highlight running
I was debugging systemd waiting on a missing disk, and noticed
that the job listing could use some polishing. Jobs that are
actually running are highlighted, so it's easier to see what
very actually waiting for.
Also, the needed widths are precalculated, to use available columns
more ecomically. |
b92bea5d2a9481de69bb627a7b442a9f58fca43d |
|
06-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use initalization instead of explicit zeroing
Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.
A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:
$ size build/.libs/systemd
text data bss dec hex filename
before 897737 107300 2560 1007597 f5fed build/.libs/systemd
after 897873 107300 2560 1007733 f6075 build/.libs/systemd
… actually less than 1‰.
A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert. |
5a8e9427a6db2af25c1ae628ad6caea0c64a11ec |
|
05-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: tweak drop-in display
So far we didn't place spaces between the box drawing chars and the
values next to them. Let's be consistent here.
(Or to turn this around: if we really want to place a space there we
probably should do that in all our tree outputs, not just here...) |
45a4f72337f3fe26e0a07301238ccbe8eec8893c |
|
05-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: tweak output of Listen: fields a bit
It's probably a good idea to minimize the number of field names to show
in the "systemctl status" output, in order to make them useful as a
guide for the reader how things are "grouped". This patch moves
information about the used socket technology to the end of the output
lines in brackets, rather than into the field names. This turns the used
socket technology into what it is -- peripheral meta information --
instead of something that was at the core.
New output:
systemd-journald.socket - Journal Socket
Loaded: loaded (/usr/lib/systemd/system/systemd-journald.socket; static)
Active: active (running) since Fr 2013-03-29 02:16:30 CET; 1 weeks 0 days ago
Docs: man:systemd-journald.service(8)
man:journald.conf(5)
man:systemd-journald.service(8)
man:journald.conf(5)
Listen: /run/systemd/journal/stdout (Stream)
/run/systemd/journal/socket (Datagram)
/dev/log (Datagram) |
76d14b876a1c286ea62c4e0e4fc5ba3c695e169f |
|
05-Apr-2013 |
Oleksii Shevchuk <alxchk@gmail.com> |
systemctl: Add DropIn paths to status message
$ systemctl status null.target
null.target - NYAN
Loaded: loaded (/home/alxchk/.config/systemd/user/null.target; disabled)
Drop-In: /home/alxchk/.config/systemd/user/null.target.d
└─ descr.conf, install-1.conf, install.conf
/etc/systemd/user/null.target.d
└─ test.conf
Active: active since Пт 2013-04-05 20:42:13 EEST; 1min 58s ago |
e8853816bf197afc71819e28f1316a5d5ee4b4c3 |
|
05-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: align cgroups to 'n' in 'name='
Also drop ':' in repeated Docs lines. |
2fa4092c2829dd14e50c430ae2f23551d23c6c1d |
|
04-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: make time formatting a bit smarter
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h
55.050003s". Also, while outputting the accuracy is configurable.
Basically we now try use "dot notation" for all time values > 1min. For
>= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and
finally 'us'.
This should give reasonably values in most cases. |
131601349515f05b50fec4821ede38f5037ec9f4 |
|
02-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: align all status fields to common column
avahi-daemon.socket - Avahi mDNS/DNS-SD Stack Activation Socket
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.socket; enabled)
Active: active (listening) since Mon 2013-04-01 09:02:44 EDT; 14h ago
ListenStream: /var/run/avahi-daemon/socket |
67419600875f3dae2182e3f92640bae4c8cd1f2f |
|
02-Apr-2013 |
Oleksii Shevchuk <alxchk@gmail.com> |
Add Listen* to dbus properties
sockets.socket - Test
Loaded: loaded (/home/alxchk/.config/systemd/user/sockets.socket; static)
Active: inactive (dead)
Listen: Stream: /tmp/stream1
Stream: @stream4
Stream: [::]:9999
Stream: 127.0.0.2:9996
Stream: [::1]:9996
Datagram: /tmp/stream2
Datagram: @stream5
Datagram: [::]:9998
Datagram: 127.0.0.2:9995
Datagram: [::1]:9995
SequentialPacket: @stream6
SequentialPacket: /tmp/stream3
FIFO: /tmp/fifo1
Special: /dev/input/event9
Netlink: kobject-uevent 0
MessageQueue: /msgqueue1
[zj: - minor cleanups,
- free i.listen,
- remove sorting, because the order or sockets matters.] |
9607d9470eec07df817e58f64d312ccb5ac4cfcc |
|
02-Apr-2013 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
Always use our own MAX/MIN definitions
code in src/shared/macro.h only defined MAX/MIN in case
they were not defined previously. however the MAX/MIN
macros implemented in glibc are not of the "safe" kind but defined
as:
define MIN(a,b) (((a)<(b))?(a):(b))
define MAX(a,b) (((a)>(b))?(a):(b))
Avoid nasty side effects by using our own versions instead.
Also fix the warnings derived from this change.
[zj: - modify MAX3 macro to fix warning about _a shadowing _a,
- do bootchart/svg.c too,
- remove unused MIN3.] |
e62d8c3944745ed276e6d4f33153009860e5cfc5 |
|
31-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Modernization
Use _cleanup_ and wrap lines to ~80 chars and such. |
830f01f0bc1c60d765109f86ae7385caff0ed6ac |
|
30-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: no need to export variables if we can avoid it |
8333c77edf8fd1654cd96f3f6ee0f078dd64b58b |
|
29-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Always use errno > 0 to help gcc
gcc thinks that errno might be negative, and functions could return
something positive on error (-errno). Should not matter in practice,
but makes an -O4 build much quieter. |
4ad61fd1806dde23d2c99043b4bed91a196d2c82 |
|
23-Mar-2013 |
Cristian RodrÃguez <crrodriguez@opensuse.org> |
add --with-telinit=PATH configure option
Distributions that never shipped upstart do not have
"telinit" in /lib/upstart/..
Defaults to /lib/upstart/telinit so there is no change
for systems existing installs. |
1609dcb137813e8215d9ecc1f79c7dd7a788d5e0 |
|
14-Mar-2013 |
Michal Sekletar <msekleta@redhat.com> |
systemctl: remove unused variable |
427b47c4abaf4b5820e3532bf6993c7abe66703c |
|
14-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
initctl: catch write error, use _cleanup_
!= operator always returns something nonnegative, so the
error condition was not caught. |
886a64fe6903bc1ccde5c7af0eac6786918c8e49 |
|
14-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logs-show: export logic to add matches for units
After that functions which add matches, show_journal_by_unit
and show_journal_by_user_unit, become nearly identical, so
I merged them into one function. |
1b12a7b5896f94bdf33b3a6661ebabd761ea6adc |
|
07-Mar-2013 |
Harald Hoyer <harald@redhat.com> |
pager: introduce "jump to end" option
$ journalctl -be
is what you want :)
https://bugzilla.redhat.com/show_bug.cgi?id=867841 |
dec49d88d6a4febc8be0a4470183d9794b3b02b8 |
|
07-Mar-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: mangle unit name in is-enabled
https://bugs.freedesktop.org/show_bug.cgi?id=56072
https://bugzilla.redhat.com/show_bug.cgi?id=880353 |
fea9740ae463c409b84a38d2592d434c2875975b |
|
01-Mar-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: check if iterator was initialized succesfully |
d6cb60c7a05f15ce3145080007bce602a6cb52ba |
|
01-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
Revert "systemctl: try to reload daemon after enable/disable only when not running in a chroot"
This reverts commit 5522a1fa876f1ab94a2accaadca824799fdf2cab.
I am an idiot, the chroot case was already filtered out, so no point in
checking this again. |
5522a1fa876f1ab94a2accaadca824799fdf2cab |
|
01-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: try to reload daemon after enable/disable only when not running in a chroot
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009208.html |
1f4cadad8ba5bae48ae8169eebe01558ce664ee8 |
|
27-Feb-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: fix minimal number of params for new cgroup commands |
26d04f86a36595e3565c74d67863e076c3e3c773 |
|
27-Feb-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: rework resource management API
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. |
416389f7ae262ae7a0848302e7a6516597f9fad1 |
|
27-Feb-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: fix indentation |
47a0eaa60cb5434d13f0acbe048aa4681bc8b8a8 |
|
22-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: generalize action table to be usable in more action<->verb mappings
Should be no functional change. |
b85bdddafb321fa870b9250a2ff17040d6996061 |
|
22-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: make shutdown operations use irreversible jobs
Occasionally people report problem with reboot/poweroff operations hanging in
the middle. One known cause is when a new transaction to start a unit is
enqueued while the shutdown is going on. The start of the unit conflicts with
the shutdown jobs, so they get cancelled. The failure case can be quite unpleasant,
becase getty and sshd may already be stopped.
Fix it by using irreversible jobs for shutdown (reboot/poweroff/...) actions.
This applies to commands like "reboot", "telinit 6", "systemctl reboot". Should
someone desire to use reversible jobs, they can say "systemctl start reboot.target".` |
23ade460e5a118daa575a961b405d089f95e0617 |
|
22-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
core, systemctl: add support for irreversible jobs
Add a new job mode: replace-irreversibly. Jobs enqueued using this mode
cannot be implicitly canceled by later enqueued conflicting jobs.
They can however still be canceled with an explicit "systemctl cancel"
call. |
b7cf6049a36dfd8e5f3c6420243eb49d348dbd2f |
|
22-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: make "systemctl default" use "isolate" job mode
"systemctl default" should behave identically to "telinit N" (where N is the
corresponding runlevel target number), therefore it should use isolate job mode
too. |
033a842c36e7629f81d05d12a4ed8c298ad4d3f2 |
|
16-Feb-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: allow comma sepearted property lists |
d0a5cdb280f904eafacb09bbc391afd03c207b62 |
|
16-Feb-2013 |
Jan Janssen <medhefgo@web.de> |
systemctl: Don't give re-activation warning if unit is masked |
265a7a2a604a9cf92e8aa167ed48afb78e6602ea |
|
16-Feb-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: allow status with no units
This makes 'status' behave like 'list-units':
systemctl status -> status of all units
systemctl -t error status -> status of error units
systemctl -t mount status -> etc. |
f6bb13ab8db51aaedc825fec2f0458b60309b27a |
|
14-Feb-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: print wall message only if successful
systemctl would write to the wall even if unsuccessful.
https://bugs.freedesktop.org/show_bug.cgi?id=60393 |
cec7eda533d6ce74667c712de3bbad29214c1030 |
|
14-Feb-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: use automatic cleanup |
a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7 |
|
14-Feb-2013 |
Harald Hoyer <harald@redhat.com> |
honor SELinux labels, when creating and writing config files
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 |
1700761b0678a5f5b43dc5224a97cc1922f74fad |
|
13-Feb-2013 |
Simon Peeters <peeters.simon@gmail.com> |
Move systemctl dot to systemd-analyze dot |
a38694df9c49cb8953e444ff94b1d78239347dfe |
|
13-Feb-2013 |
Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
systemctl: use parse_unit_info
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
cdf3f17bfb20eac2929c8b6a582b988b790f071d |
|
13-Feb-2013 |
Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
dbus: import struct unit_info from systemctl
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com> |
883127fd84a05927f33fd25c868c52cce2123362 |
|
31-Jan-2013 |
Mauro Dreissig <mukadr@gmail.com> |
systemctl: Fix wrong assertion test |
71645acac27da55d510f2e4d61cc61b4e5b93035 |
|
19-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
unit: optionally allow making cgroup attribute changes persistent |
cc86e6b86e6431940a68fae56b84b865cf5b1e6d |
|
18-Jan-2013 |
Mirco Tischler <mt-ml@gmx.de> |
systemctl: print the user session journal for user session units. |
d2a30975827b3447ca0fd5a2c06ec1ff15ce7f0f |
|
18-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add new "get-cgroup-attr" to query current cgroup attribute value
Also adds a pair of bus calls for this to the daemon. |
d54110d11d5ea3381cfdd129356b91669b547216 |
|
18-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: it's probably a good idea not to alter return parameters if we fail
We generally follow the rule not to touch return values unless we
succeed, so for the sake of uniformity do the same here. |
52a2ab41e029728ef0a4303d7aafc9d47f116004 |
|
18-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: no need to check this explicitly, we already checked it a few lines up anyway, so let's just assert |
540e7dbe9edeb7a309a89c51f22d27e3a7cd6390 |
|
18-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: we can make this faster and shorten it a bit with strv_extend()
Now that strv_extend() is not so slow anymore, we can make use of it, to
shorten our code a bit. |
e31165b26212b45e135fd4cd7d618a081d50bd28 |
|
18-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make list-dependencies default to default.target |
e608b38a87fde7fd0b882c96ff235b26660ce074 |
|
18-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: we can use nulstr_contains() for this lookup
It's a bit easier to read... |
55c0b89c575fcb2c075286d444ed4fb1cf8c8563 |
|
17-Jan-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl add command list-dependencies
systemctl list-dependencies lists all unit's dependecies and
recursively expands all subsidiary target units into a tree.
Primary purpose for this command is to show all units which are
enabled in specified target. |
9bdbc2e2ec523dbefe1c1c7e164b5544aff0b185 |
|
16-Jan-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is specified
New file output.h with output flags and modes.
--full parameter also for cgls and loginctl.
Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup,
show_cgroup_and_extra, show_cgroup_and_extra_by_spec).
get_process_cmdline with max_length == 0 will not ellipsize output.
Replace LINE_MAX with 0 in some calls of get_process_cmdline.
[zj: Default to --full when under pager for clgs.
Drop '-f' since it wasn't documented and didn't actually work.
Reindent a bit.
] |
ec76596cab6298ae1fb9d7cbe4ad56f175e87943 |
|
16-Jan-2013 |
Dave Reisner <dreisner@archlinux.org> |
systemctl: fix assertion hit by incorrect comparison |
69bd386c4c0618d686e1b5ac01c0e9658b1539b6 |
|
15-Jan-2013 |
Oleksii Shevchuk <alxchk@gmail.com> |
Typo fix |
59164be40e6b520315d87e1ef16a3be65c854224 |
|
15-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: when inhibiting shutdown/suspend also check for other login sessions |
aca26b52200a4666c9f80a942150a90004130010 |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: drop compat with really really old systemd versions |
1dcf60656cc68cf0182703d77e31f24f05b0c8cc |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: be smarter when mangling snapshot names
For "systemctl snapshot" it makes no sense to complete an incomplete
name with ".service" as we previously did, use ".snapshot" instead.
Also, don't bother with mount units or suchlike, we know that this must
be a snapshot and hence is the only sane way for completion. |
f84190d8cad66f36eef1d851213711244ca297be |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: numerous modernizations |
246aa6dd9dcea84bb945d16ec86e69f869dbb9b4 |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add bus API and systemctl commands for altering cgroup parameters during runtime |
748ebafa7a10d4e1f168dd8ae0193124cdf4226e |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: honour inhibitors only when running unprivileged |
d255133d8edc84662d2370a77414505a800d1922 |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: don't hit an assert if we try to reboot and dbus is dead
https://bugzilla.redhat.com/show_bug.cgi?id=889624 |
60f9ba0b94a4a86751d9a8c8b210cf07fc0962ba |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: rework is-active and is-failed code |
b37844d3d72af3afbcb801476cf07c085519f392 |
|
11-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: honour inhibitors when shutting down or entering sleep state |
5dd9014faf58bf974352043fbddd3a8e9c3cd9d9 |
|
10-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
dbus: duplicate Job.Cancel() as CancelJob() and Snapshot.Remove() as RemoveSnapshot() on the Manager interface
For all other object mehtods there are already counterparts on the
manager object, as they help us reduce round-trips. So let's complete
this, and reduce complexity on the client side a bit.
As a side effect this also makes "systemctl snapshot" without arguments
work again. |
bc2708414babc5c99bb8000e63c84e87606cc15d |
|
04-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore! |
77e68fa2f0bd018bab2621a31919bfaa6a6b0a35 |
|
04-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
systemctl: enable chkconfig compat only if chkconfig is found rather than based on distro |
1a0fce458d3b45624c5817006735d59a5689ef83 |
|
04-Jan-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
systemctl: add is-failed
Adds is-failed to join is-active and is-enabled.
I grabbed this one from the todo list. Most of the functionality was
already there for is-active. I just needed to make check_one_unit take
the states to check for as an argument instead of the hardcoded
"active" and "reloading".
is-failed will return 1 if none of the units given are failed. This is
different from is-active which will return 3 if none of the units
given are active. It returns 3 with this comment:
/* According to LSB: "program is not running" */
As that does not make sense when looking for failed units I simply
chose 1 instead. |
13068da8b0b27bc56f0c5b245e5dbaa3dcd102d9 |
|
28-Dec-2012 |
Tom Gundersen <teg@jklm.no> |
systemctl: switch-root - read init= from /proc/cmdline
If the path to init is not specified as an argumnt to systemctl, but
init= is given on the kernel commandline, use that.
This means the initrd does not need glue code to parse the kernel
commandline before passing on init= to systemctl.
Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Reisner <dreisner@archlinux.org> |
b08121d00467874ac9aa0dc6f59787877f1bb427 |
|
24-Dec-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: don't show cgroup field for a unit if cgroup is empty |
4b9d3dc9748ec3f52a71b06f851f4398462a1c60 |
|
06-Dec-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: verbose message on missing [Install]
People still don't understand what the message implies.
We have to be more verbose (or more intelligent and detect some of the
cases automatically, but that's not so easy).
https://bugzilla.redhat.com/show_bug.cgi?id=884438 |
d9847b32462d3943c9788e05454364f544617b9d |
|
03-Dec-2012 |
Umut Tezduyar <umut@tezduyar.com> |
systemctl: fix typos in help text |
9185c8e6266d607df665d24f525b48b39e20d847 |
|
23-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
time-util: also rename FORMAT_TIMESTAMP_PRETTY → _MAX |
bbb8486e1709ee297a1eb803f88041e1da1fa436 |
|
23-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
util: rename format_timestamp_pretty() to format_timestamp_relative() because that describes much better what it does |
95ec8647c70b2c1fe816301aca2143d587a60c82 |
|
16-Nov-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: recommend journalctl -x more often |
45c0c61df3c63cb1f20505c8d292385d5e300578 |
|
15-Nov-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: add help for --type/-t
The list of types and load states if lengthy, so a little reminder
can be sometimes useful. |
48c2826b4ea686cd69e489f9c6fe2d9ddebb6a69 |
|
15-Nov-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: remove empty line in case of no units |
a9cdc94f7ff40f22a3cf9472f612a80730a1b010 |
|
12-Nov-2012 |
Dave Reisner <dreisner@archlinux.org> |
enable localization for common *ctl commands |
ccd413871bdada8f9b1dbb910380c07e04e56122 |
|
28-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: skip JOBS column if no jobs
Output is very constrained. This change saves 4 columns in the common
case. |
6524990fdc98370ecba5d9f73e67161e8798c010 |
|
28-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) |
2609659f0dafacacb0429cd8ab60885f7d85f25f |
|
23-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: refer to systemctl -n, to not overwhelm the admin |
df77cdf0fccadbb5989042d43cde2f88aa9afd2c |
|
19-Oct-2012 |
Christian Hesse <list@eworm.de> |
systemctl: fix return code in chroot
If 'systemctl enable' (and friends) is run inside chroot it always
exits with a bad return code. unit_file_enable() returns the number of
symlink rules that were supposed to be created. So resetting r to 0 and
exiting gracefully should be the correct way. |
31e767f73a55d4d2a97aa5a7dec872822daffb2e |
|
19-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: modernization |
aae9a96d4b3a8562af9e8c6a23871b442645b954 |
|
19-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: remove --follow option
Given that "journalctl -u" exists now there's no need to duplicate this
functionality in systemctl, so let's drop this, especially given that it
always felt a bit awkward to overload "-f" to both --force and --follow,
and to have continues output with a status header for this.
systemctl status -f avahi-daemon
now becomes:
journalctl -fu avahi-daemon
Which is shorter and a lot less redundant. |
8481248b9fbddc6d5e6ff26eb23505ef13dc85f7 |
|
19-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
util: unify usage of on_tty() in util.c |
f89a3b6f5bf695186e7b9e6cc63993b1272e7569 |
|
18-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: unify ellipsation handling between journalctl and systemctl |
44386fc156bfa2d623567ff7f7c8f313cfafb9bc |
|
15-Oct-2012 |
Lukas Nykryn <lnykryn@redhat.com> |
systemctl: don't mangle name when it is a path
systemctl enable, disable, ... can also accept full path and in this case
we don't need to alter it.
https://bugzilla.redhat.com/show_bug.cgi?id=866346 |
48383c251185c4596e9098878b28334c69e7bfd9 |
|
11-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: support epxorting the journal in a format suitable for text/event-stream |
57f7ae4f68cf9ac72213b9cfc87a362ef631b483 |
|
04-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: colorize number of units listed |
ad94ad63e31e4822d1cf5b0908be0f3111930ff9 |
|
04-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: do not print header if no units listed |
cad45ba11ec3572296361f53f5852ffb97a97fa3 |
|
02-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
selinux: rework selinux access check logic
a) Instead of parsing the bus messages inside of selinux-access.c
simply pass everything pre-parsed in the functions
b) implement the access checking with a macro that resolves to nothing
on non-selinux builds
c) split out the selinux checks into their own sources
selinux-util.[ch]
d) this unifies the job creation code behind the D-Bus calls
Manager.StartUnit() and Unit.Start(). |
08ace05beb1d09b6ebc5e9cafc2b972b39fa2437 |
|
28-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
logs-show: various cleanups
Among other cleanups this introduces a threshold for the size of binary
blobs we serialize as integer arrays in the JSON output. THis can be
disabled via --all. |
49111a708eb3bc8488c56c4695fa36c826bf3657 |
|
19-Sep-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: warn about triggering units only at the end
Instead of checking each unit separately, check once at the end. This
should avoid spurious warnings about a service being triggerable by
other stuff. |
d39b034af6f9795c4f17a8ddd186f026bb74193c |
|
19-Sep-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: properly report success
Systemctl would always return 1, because it treated uninteresting dbus
messages ("job added") as errors. Just ignore everything apart from
interesting ("job removed") messages. |
46eddbb597a379ef64a3ee76029ce625902e8107 |
|
19-Sep-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: use automatic cleanup once more
Semantics are slightly different, because before unit_name_mangle
returning NULL was ignored, and now it is reported as oom. But
unit_name_mangle only returns NULL on oom. |
d3b52baff90876a648e321f3658a74bc58a8647c |
|
19-Sep-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: use automatic cleanup
Introduce a helper method to unref dbus messages and use it. |
67445f4e22ad924394acdd4fd49e6f238244a5ca |
|
18-Sep-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core: move ManagerRunningAs to shared
Note: I did s/MANAGER/SYSTEMD/ everywhere, even though it makes the
patch quite verbose. Nevertheless, keeping MANAGER prefix in some
places, and SYSTEMD prefix in others would just lead to confusion down
the road. Better to rip off the band-aid now. |
67f3c40265471056d1e532c6d6e36a521b0a780a |
|
14-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show unit name when a job fails
https://bugzilla.redhat.com/show_bug.cgi?id=845028
https://bugzilla.redhat.com/show_bug.cgi?id=846483 |
a33fdebb30cac102db7037a5bcdc85d6c49d4aad |
|
13-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: minor coding style fixes |
37370d0cbe7c79d3f5b44a9ddbfac87c59dc09dd |
|
13-Sep-2012 |
Václav PavlÃn < <vpavlin@redhat.com> |
install: append .service when enable/disable... is called
https://bugzilla.redhat.com/show_bug.cgi?id=856975 |
bb3241614a1a3a3ef68329dadc56e8fec090ff64 |
|
12-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: direct the user to list-unit-files from the list-units output |
b5b46d599524341ddd7407e5dff1021af8ff5089 |
|
11-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
when determining unit file list, include invalid unit names in an "invalid" state |
dcc9ba80e160bb6e2ed97c7ee343953721702b0c |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: properly build flags for show_journal_by_unit() |
57371e5829a61e5ee6c9f98404dfc729d6c62608 |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
shutdown: remove explicit sync() invocations
The kernel implicitly does sync() anyway, hence there is no need to do
that in userspace explicitly. This makes the "-n" switch to halt(8) a
noop. |
a6e87e90ede66815989ba2db92a07102a69906fe |
|
06-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: rework JSON output mode
This splits the JSON output mode into different modes: json and
json-pretty. The former printing one entry per line, the latter showing
JSON objects nicely indented and in multiple lines to make it easier to
read for humans. |
96342de68d0d6de71a062d984dafd2a0905ed9fe |
|
14-Aug-2012 |
Lukas Nykryn <lnykryn@redhat.com> |
service: add options RestartPreventExitStatus and SuccessExitStatus
In some cases, like wrong configuration, restarting after error
does not help, so administrator can specify statuses by RestartPreventExitStatus
which will not cause restart of a service.
Sometimes you have non-standart exit status, so this can be specified
by SuccessfulExitStatus. |
c516c8d17f77a1c761447f4c40c8dfffeda2e06d |
|
10-Aug-2012 |
Simon Peeters <peeters.simon@gmail.com> |
systemctl: fix issue with systemctl daemon-reexec |
c67de56f50b83ec0d34308a6de80f6c65879b1b5 |
|
08-Aug-2012 |
Simon Peeters <peeters.simon@gmail.com> |
move bus_method_call_with_reply() to dbus-common |
f22f08cd5fc072fc4d7eec4700b42e4308ada42e |
|
08-Aug-2012 |
Simon Peeters <peeters.simon@gmail.com> |
systemctl: use bus_method_call_with_reply() where posible
use the method introduced by the previous commit |
f3de59c5929c520a2a1bd0acb9e15a99f9d38999 |
|
08-Aug-2012 |
Simon Peeters <peeters.simon@gmail.com> |
systemctl: add bus_method_call_with_reply
this method combines the folowing dbus calls and there error handling:
dbus_message_new_method_call()
dbus_message_append_args()
dbus_connection_send_with_reply_and_block() |
dfcc5c33f42554a5293e68e7093da2403e363997 |
|
06-Aug-2012 |
Michal Sekletar <msekleta@redhat.com> |
shutdown: allow to specify broadcast message when cancelling shutdown
makes shutdown behaviour more compatible |
498261871dfa2a930ec84b13a176e3bdc43aa212 |
|
26-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
journalctl: hightlight log lines by priority
warn/notice = bright white
< error = red |
0d0f0c50d3a1d90f03972a6abb82e6413daaa583 |
|
26-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera |
669241a076108e0483d7d8475beaa506106d077e |
|
25-Jul-2012 |
Shawn Landden <shawnlandden@gmail.com> |
use "Out of memory." consistantly (or with "\n")
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.
Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id |
81cf1c43c9a24834433bb5c1f0dc6eb3c1c5b44f |
|
23-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: use color specification understood by dot
grey66 is aproximately equal to dark grey. Not understanding dark grey is really
a bug in dot, but trivial to work around.
Closes https://bugs.freedesktop.org/show_bug.cgi?id=45706 |
d91b8841d7a3ee08aa686852154b08a3e9eb9732 |
|
22-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
collect, keymap, systemctl: use _noreturn_ |
c74f17d96cccd4cc998fd037cb92046930188c91 |
|
20-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
core: drop KillMode parameter from KillUnit() bus call
It made no sense, and since we are documenting the bus calls now and
want to include them in our stability promise we really should get it
cleaned up sooner, not later. |
085d71209ba32c1e4e72ec031536be892054352e |
|
17-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logs: Adapt interface in log-show.c (show_journal_by_unit)
Convert more flag arguments into one flag variable. |
c147dc42f8b3383a3ced69aaa75e21df4fe75a96 |
|
10-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: filter shown units by their load state
E.g. systemctl --all -t masked gives the list of masked units.
The -t/--type option is reused. This is possible because unit types
and unit load states are called differently, so it is possible to
distinguish what the user meant. Using the same option also means that
the interface is user for the user: less options to remember. |
6d97280899a766ad7b4a6b07cc803709a08b364b |
|
10-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemctl: check the argument to -t for invalid values
Systemctl accepted anything as the argument for -t, and simply said '0
units found'. It is better to catch this user error early. |
8401e9f91d65c3d8d49cf0d2e35d03146354e957 |
|
09-Jul-2012 |
Auke Kok <auke-jan.h.kok@intel.com> |
MeeGo: Remove build support for MeeGo distribution.
The MeeGo distribution is still a supported distribution, but
will probably not see an updated version of systemd anymore.
Most of the development is focussing on Tizen now, and the
generic support for building --with-distro=other is more than
adequate enough.
This patch removes the support as a custom configuration build
target in systemd. People who are still building this for
the MeeGo distribution should build as "other" distro. |
0315fe37461972f36a3ba8ee4fcd73d6dce3c807 |
|
25-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: make sure we print URLs we can't show in systemctl in a nicely clickable way |
b0193f1c1f1540bfccbdca02df82669b9308e4e2 |
|
22-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: automatically turn paths and unescaped unit names into proper unit names
This makes sure that
systemctl status /home
is implicitly translated to:
systemctl status /home.mount
Similar, /dev/foobar becomes dev-foobar.device.
Also, all characters that cannot be part of a unit name are implicitly
escaped. |
089842938dd0f4080084044bb9a1a3b00137926a |
|
17-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: expose and make use of cutoff times of journal
This helps explaining when the log output of "systemctl status" is
incomplete because the logs got rotated since the service was started. |
34cdc274edd870ffc27d21cf82655a0114948748 |
|
14-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: clearer error message for missing install information
Some users found it difficult to understand what systemctl was telling
them.
Instead of "install information" talk about "[Install] section", which
is more likely to ring a bell. And suggest that it is intentional, so
that users do not attempt to "correct" the unit files.
https://bugzilla.redhat.com/show_bug.cgi?id=817033 |
48899192a7b28b6a338cc8ec18aa35ccd8867acb |
|
13-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
unit-name: introduce unit_dbus_path_from_name()
Use the same function in core and in systemctl.
get_unit_path() in systemctl becomes unnecessary. |
1c291cf34cb22c8ca5ec0db122bd5e8bfabe9ac5 |
|
13-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: warn about all active triggers, not just sockets |
222d0348f97aa132cc24ed3a38f18463e9b0e8c9 |
|
13-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: fix iteration in check_listening_sockets() |
31be1221a13a13fa1d5e82a44f07e2abfb8344c5 |
|
13-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: remove is_socket_listening
We can use the functionality of check_unit(). Factor out
check_one_unit(). |
e61a3135e99f349af949520e85d06e7fab4b5d9e |
|
13-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: style fixes for the previous patch
Use the usual indentation, bracketing style, and no assignments in ifs.
Since check_listening_sockets provides just optional hints for the user,
don't pass its DBusErrors to the caller. |
701cdcb9ee846b3d1629b55a11c61a3343af4874 |
|
13-Jun-2012 |
Michal Sekletar <msekleta@redhat.com> |
systemctl will print warning when stopping unit
systemctl now prints warning and list of sockets in listenning state which can
trigger start of service which is about to be stopped |
b43f208f78666fd27e274daa946ae57becd59dd6 |
|
04-Jun-2012 |
Kay Sievers <kay@vrfy.org> |
systemctl: rename "man" to "help" |
256425cc10d74c13602527eb86b4ba0938964565 |
|
31-May-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: introduce "systemctl man" to show man page for unit
For now this only reads man: URLs, but later on we might want to support
info: too. http/https is probably out of focus. |
ba1261bc02693ac8a7712ade14aab8e22989ba88 |
|
30-May-2012 |
Lennart Poettering <lennart@poettering.net> |
build-sys: fix built with --disable-logind |
07719a21b6425d378b36bb8d7f47ad5ec5296d28 |
|
23-May-2012 |
Lennart Poettering <lennart@poettering.net> |
manager: rework generator logic
Previously generated units were always placed at the end of the search
path. With this change there will be three unit dirs instead of one, to
place generated entries at the beginning, in the middle and at the end
of the search path:
beginning: for units that need to override all configuration, regardless
of user or vendor. Example use: system-update-generator uses this to
temporarily redirect default.target.
middle: for units that need to override vendor configuration, but not
vendor configuration. Example use: /etc/fstab should override vendor
supplied configuration (think /tmp), but should not override native user
configuration.
end: does not override anything but is available as well. Possible usage
might be to convert D-Bus bus service files to native units but allowing
vendor supplied native units to win. |
1b64d026af01277e332d10d9e67e2eed5a4ded28 |
|
22-May-2012 |
Lennart Poettering <lennart@poettering.net> |
units: remove service sysv_path variable and replace it by generic unit_path
UnitPath= is also writable via native units and may be used by generators
to clarify from which file a unit is generated. This patch also hooks up
the cryptsetup and fstab generators to set UnitPath= accordingly. |
386da8589b4206b7fc5f5729908473edacbee013 |
|
21-May-2012 |
Nis Martensen <nis.martensen@web.de> |
delta: fix spelling of overridden |
49dbfa7b2b0bf3906704dac1eaeb4eba91056a19 |
|
21-May-2012 |
Lennart Poettering <lennart@poettering.net> |
units: introduce new Documentation= field and make use of it everywhere
This should help making the boot process a bit easier to explore and
understand for the administrator. The simple idea is that "systemctl
status" now shows a link to documentation alongside the other status and
decriptionary information of a service.
This patch adds the necessary fields to all our shipped units if we have
proper documentation for them. |
a223b325b409b325f4c2c2e11268596edd842631 |
|
21-May-2012 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: drop useless DBus calls from 'systemctl show foo.service'
systemctl called LoadUnit, GetUnit, GetAll in this order to get the properties.
It is useless to load units explicitly, because it won't ensure anything. The
unit may be freed immediately by the garbage collector.
It is unnecessary to call GetUnit, because systemctl can easily translate the
unit name to DBus path by itself.
GetAll will load the unit if necessary. |
957eb8cab28dc83aa4b800d033031e53cd0a9e00 |
|
14-May-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: add switch-root verb |
d889a2069a87e4617b32ddbdeace5a53a12c699d |
|
08-May-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: implement suspend/hibernate calls with inhibition logic |
6edd7d0a09171ea5ae8e01b7b1cbcb0bdfbfeb16 |
|
08-May-2012 |
Lennart Poettering <lennart@poettering.net> |
sleep: implement suspend/hibernate as first class targets |
9eb977db5b89b44f254ab40c1876a76b7d7ea2d0 |
|
08-May-2012 |
Kay Sievers <kay@vrfy.org> |
util: split-out path-util.[ch] |
59ddae9f9c0992fe193fa371a5d114227b35785c |
|
04-May-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: fix typo
as Sergey Ptashnick pointed out we should write "poweroff" once instead
of "reboot" twice. |
06dab8e18aebf822392c7ca66c5bf3c1200fdec8 |
|
03-May-2012 |
Lennart Poettering <lennart@poettering.net> |
dbus: include unit name in JobNew/JobRemoved signals
This breaks D-Bus interface slightly, but since the D-Bus API isn't
covered by the interface stability promise this should be OK. |
3beddc7861783347eb0aaf5fa492e8b2aef9e691 |
|
03-May-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: allow 'systemctl reboot -ff' to succeed even without D-Bus |
c32b90dec78afe0db51ff0afa6448c01524105fa |
|
03-May-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: print a nice error message if an unprivileged user calls systemctl reboot -ff |
65491fd8c993a0e5cbc275613babcac98f4cd7bd |
|
03-May-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: get rid of arg_immediate and fold it into arg_force |
b69d29ce049f12d463a589e18561dd10ee8c09f1 |
|
16-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
systemctl: show main and control PID explicitly in cgroup-show
In some cases the main/control PID of a service can be outside of the
services cgroups (for example, if logind readjusts the processes'
cgroup). In order to clarify this for the user show the main/control PID
in the cgroup tree nonetheless, but mark them specially. |
c3175a7f40a2d2fabc3a2de63033a6810d45221a |
|
16-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
cgls: don't show empty cgroups by default |
dce818b390a857a11f7dd634684500675cf79833 |
|
12-Apr-2012 |
Kay Sievers <kay@vrfy.org> |
move all tools to subdirs |