mirror of
https://github.com/systemd/systemd
synced 2025-11-22 10:14:45 +01:00
Compare commits
No commits in common. "346b7b6b4931fc6bee9e820e0160dd024a86ed52" and "5c7be924941456c10e7c0c290160c4baa84f776d" have entirely different histories.
346b7b6b49
...
5c7be92494
@ -179,8 +179,8 @@
|
||||
<citerefentry><refentrytitle>sd_booted</refentrytitle><manvolnum>3</manvolnum></citerefentry>. An
|
||||
alternate way to check for this state is to call
|
||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> with
|
||||
the <command>is-system-running</command> command. It will output <literal>offline</literal> if the
|
||||
system was not booted with systemd, though the return value has a different meaning.</para></listitem>
|
||||
the <command>is-system-running</command> command. It will return <literal>offline</literal> if the
|
||||
system was not booted with systemd. </para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
|
||||
@ -35,8 +35,6 @@
|
||||
"reset-failed:Reset failed state for all, one, or more units"
|
||||
"list-dependencies:Show unit dependency tree"
|
||||
"clean:Remove configuration, state, cache, logs or runtime data of units"
|
||||
"freeze:Freeze one or more units specified on the command line using cgroup freezer"
|
||||
"thaw:Thaw (unfreeze) one or more units specified on the command line."
|
||||
"bind:Bind mount a path from the host into a unit's namespace"
|
||||
"mount-image:Mount an image from the host into a unit's namespace"
|
||||
"whoami:Determines as part of which unit the command is being invoked"
|
||||
@ -317,7 +315,7 @@ done
|
||||
}
|
||||
|
||||
# Completion functions for STOPPABLE_UNITS
|
||||
for fun in stop condstop kill try-restart condrestart freeze thaw; do
|
||||
for fun in stop kill try-restart condrestart ; do
|
||||
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
||||
{
|
||||
local _sys_active_units; _systemctl_active_units
|
||||
|
||||
@ -79,8 +79,6 @@ const char* glyph_full(Glyph code, bool force_utf) {
|
||||
[GLYPH_SPARKLES] = "*",
|
||||
[GLYPH_LOW_BATTERY] = "!",
|
||||
[GLYPH_WARNING_SIGN] = "!",
|
||||
[GLYPH_COMPUTER_DISK] = "o",
|
||||
[GLYPH_WORLD] = "W",
|
||||
[GLYPH_RED_CIRCLE] = "o",
|
||||
[GLYPH_YELLOW_CIRCLE] = "o",
|
||||
[GLYPH_BLUE_CIRCLE] = "o",
|
||||
|
||||
@ -955,7 +955,7 @@ finish:
|
||||
return r;
|
||||
}
|
||||
|
||||
int terminal_reset_ansi_seq(int fd) {
|
||||
static int terminal_reset_ansi_seq(int fd) {
|
||||
int r, k;
|
||||
|
||||
assert(fd >= 0);
|
||||
|
||||
@ -34,8 +34,6 @@
|
||||
|
||||
bool isatty_safe(int fd);
|
||||
|
||||
int terminal_reset_ansi_seq(int fd);
|
||||
|
||||
typedef enum TerminalResetFlags {
|
||||
TERMINAL_RESET_SWITCH_TO_TEXT = 1 << 0,
|
||||
TERMINAL_RESET_AVOID_ANSI_SEQ = 1 << 1,
|
||||
|
||||
@ -90,12 +90,8 @@ modulesloaddir=${modules_load_dir}
|
||||
catalog_dir=${prefix}/lib/systemd/catalog
|
||||
catalogdir=${catalog_dir}
|
||||
|
||||
system_alloc_uid_min={{SYSTEM_ALLOC_UID_MIN}}
|
||||
systemallocuidmin=${system_alloc_uid_min}
|
||||
system_uid_max={{SYSTEM_UID_MAX}}
|
||||
systemuidmax=${system_uid_max}
|
||||
system_alloc_gid_min={{SYSTEM_ALLOC_GID_MIN}}
|
||||
systemallocgidmin=${system_alloc_gid_min}
|
||||
system_gid_max={{SYSTEM_GID_MAX}}
|
||||
systemgidmax=${system_gid_max}
|
||||
|
||||
|
||||
@ -5384,7 +5384,7 @@ static int run_container(
|
||||
|
||||
/* Registration always happens on the system bus */
|
||||
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *system_bus = NULL;
|
||||
if (arg_register || (arg_privileged && !arg_keep_unit)) {
|
||||
if (arg_register || arg_privileged) {
|
||||
r = sd_bus_default_system(&system_bus);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to open system bus: %m");
|
||||
@ -5399,7 +5399,6 @@ static int run_container(
|
||||
/* Scope allocation happens on the user bus if we are unpriv, otherwise system bus. */
|
||||
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *user_bus = NULL;
|
||||
_cleanup_(sd_bus_unrefp) sd_bus *runtime_bus = NULL;
|
||||
if (!arg_keep_unit) {
|
||||
if (arg_privileged)
|
||||
runtime_bus = sd_bus_ref(system_bus);
|
||||
else {
|
||||
@ -5414,6 +5413,7 @@ static int run_container(
|
||||
runtime_bus = sd_bus_ref(user_bus);
|
||||
}
|
||||
|
||||
if (!arg_keep_unit) {
|
||||
/* When a new scope is created for this container, then we'll be registered as its controller, in which
|
||||
* case PID 1 will send us a friendly RequestStop signal, when it is asked to terminate the
|
||||
* scope. Let's hook into that, and cleanly shut down the container, and print a friendly message. */
|
||||
|
||||
@ -81,9 +81,11 @@ static int allowed_fstypes(char ***ret_strv) {
|
||||
assert(ret_strv);
|
||||
|
||||
e = secure_getenv("SYSTEMD_DISSECT_FILE_SYSTEMS");
|
||||
if (e)
|
||||
if (e) {
|
||||
l = strv_split(e, ":");
|
||||
else
|
||||
if (!l)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
l = strv_new("btrfs",
|
||||
"erofs",
|
||||
"ext4",
|
||||
@ -93,8 +95,10 @@ static int allowed_fstypes(char ***ret_strv) {
|
||||
"xfs");
|
||||
if (!l)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
*ret_strv = TAKE_PTR(l);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -133,6 +133,13 @@ static void pty_forward_disconnect(PTYForward *f) {
|
||||
/* STDIN/STDOUT should not be non-blocking normally, so let's reset it */
|
||||
(void) fd_nonblock(f->output_fd, false);
|
||||
|
||||
if (colors_enabled()) {
|
||||
(void) loop_write(f->output_fd, ANSI_NORMAL ANSI_ERASE_TO_END_OF_SCREEN, SIZE_MAX);
|
||||
|
||||
if (f->title)
|
||||
(void) loop_write(f->output_fd, ANSI_WINDOW_TITLE_POP, SIZE_MAX);
|
||||
}
|
||||
|
||||
if (f->last_char_set && f->last_char != '\n') {
|
||||
const char *s;
|
||||
|
||||
@ -146,13 +153,6 @@ static void pty_forward_disconnect(PTYForward *f) {
|
||||
f->last_char = '\n';
|
||||
}
|
||||
|
||||
if (colors_enabled()) {
|
||||
if (f->title)
|
||||
(void) loop_write(f->output_fd, ANSI_WINDOW_TITLE_POP, SIZE_MAX);
|
||||
|
||||
terminal_reset_ansi_seq(f->output_fd);
|
||||
}
|
||||
|
||||
if (f->close_output_fd)
|
||||
f->output_fd = safe_close(f->output_fd);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user