diff --git a/man/systemctl.xml b/man/systemctl.xml
index a4023349d5..bd64e430c3 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -2012,10 +2012,18 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
- Don't generate the warning shown by default when using
- enable or disable on units
- without install information (i.e. don't have or have an empty
- [Install] section).
+ Don't generate the warnings shown by default in the following cases:
+
+
+ when systemctl is invoked without procfs mounted on
+ /proc/,
+
+
+ when using enable or disable on units without
+ install information (i.e. don't have or have an empty [Install] section).
+
+
+
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index f935960c77..3c64467e2f 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -128,7 +128,7 @@ _systemctl () {
[STANDALONE]='--all -a --reverse --after --before --defaults --force -f --full -l --global
--help -h --no-ask-password --no-block --legend=no --no-pager --no-reload --no-wall --now
--quiet -q --system --user --version --runtime --recursive -r --firmware-setup
- --show-types --plain --failed --value --fail --dry-run --wait'
+ --show-types --plain --failed --value --fail --dry-run --wait --no-warn'
[ARG]='--host -H --kill-whom --property -p --signal -s --type -t --state --job-mode --root
--preset-mode -n --lines -o --output -M --machine --message --timestamp --check-inhibitors'
)
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index d471743030..2811582236 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -480,6 +480,7 @@ _arguments -s \
'--show-types[When showing sockets, show socket type]' \
'--check-inhibitors[Specify if inhibitors should be checked]:mode:_systemctl_check_inhibitors' \
{-q,--quiet}'[Suppress output]' \
+ '--no-warn[Suppress several warnings shown by default]' \
'--no-block[Do not wait until operation finished]' \
'--legend=no[Do not print a legend, i.e. the column headers and the footer with hints]' \
'--no-pager[Do not pipe output into a pager]' \
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index ae9b95620e..4e7fd0460c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -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)