Merge pull request #25661 from yuwata/systemctl-suppress-warning
systemctl: suppress warning about missing /proc/ when --no-warn
This commit is contained in:
@@ -281,8 +281,7 @@ static int systemctl_help(void) {
|
||||
" kexec, suspend, hibernate, suspend-then-hibernate,\n"
|
||||
" hybrid-sleep, default, rescue, emergency, and exit.\n"
|
||||
" -q --quiet Suppress output\n"
|
||||
" --no-warn Don't generate warning when trying to enable/disable\n"
|
||||
" units without install information\n"
|
||||
" --no-warn Suppress several warnings shown by default\n"
|
||||
" --wait For (re)start, wait until service stopped again\n"
|
||||
" For is-system-running, wait until startup is completed\n"
|
||||
" --no-block Do not wait until operation finished\n"
|
||||
@@ -1168,11 +1167,12 @@ static int run(int argc, char *argv[]) {
|
||||
goto finish;
|
||||
|
||||
if (proc_mounted() == 0)
|
||||
log_warning("%s%s/proc/ is not mounted. This is not a supported mode of operation. Please fix\n"
|
||||
"your invocation environment to mount /proc/ and /sys/ properly. Proceeding anyway.\n"
|
||||
"Your mileage may vary.",
|
||||
emoji_enabled() ? special_glyph(SPECIAL_GLYPH_WARNING_SIGN) : "",
|
||||
emoji_enabled() ? " " : "");
|
||||
log_full(arg_no_warn ? LOG_DEBUG : LOG_WARNING,
|
||||
"%s%s/proc/ is not mounted. This is not a supported mode of operation. Please fix\n"
|
||||
"your invocation environment to mount /proc/ and /sys/ properly. Proceeding anyway.\n"
|
||||
"Your mileage may vary.",
|
||||
emoji_enabled() ? special_glyph(SPECIAL_GLYPH_WARNING_SIGN) : "",
|
||||
emoji_enabled() ? " " : "");
|
||||
|
||||
if (arg_action != ACTION_SYSTEMCTL && running_in_chroot() > 0) {
|
||||
if (!arg_quiet)
|
||||
|
||||
Reference in New Issue
Block a user