From 3fd1bf7ad463f5367753e143446e9718b6431931 Mon Sep 17 00:00:00 2001 From: Andrew Walker Date: Tue, 3 Dec 2024 07:00:58 -0600 Subject: [PATCH] Move warning about changes from shell to MOTD This warning originally only displayed in root shell. As users are switching to having multiple admin accounts, we need to provide constructive notice that what they are doing is potentially unsupported and may result in terrible things. (cherry picked from commit b0c781e29e693dfe1eba924c16aff35312ee19cd) --- src/freenas/root/.warning | 6 ------ src/freenas/root/.zlogin | 2 -- src/middlewared/middlewared/etc_files/motd.mako | 5 +++++ 3 files changed, 5 insertions(+), 8 deletions(-) delete mode 100644 src/freenas/root/.warning diff --git a/src/freenas/root/.warning b/src/freenas/root/.warning deleted file mode 100644 index 0e1d2f7231dd..000000000000 --- a/src/freenas/root/.warning +++ /dev/null @@ -1,6 +0,0 @@ - -Warning: the supported mechanisms for making configuration changes -are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE -NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY -RESULT IN SYSTEM FAILURE. - diff --git a/src/freenas/root/.zlogin b/src/freenas/root/.zlogin index 31ac6f4eb9ba..6c13053e6839 100644 --- a/src/freenas/root/.zlogin +++ b/src/freenas/root/.zlogin @@ -1,5 +1,3 @@ if [ -f /usr/local/sbin/hactl ]; then /usr/local/sbin/hactl status -q fi - -cat ~/.warning diff --git a/src/middlewared/middlewared/etc_files/motd.mako b/src/middlewared/middlewared/etc_files/motd.mako index d417b297bb63..6fe6c29002f6 100644 --- a/src/middlewared/middlewared/etc_files/motd.mako +++ b/src/middlewared/middlewared/etc_files/motd.mako @@ -12,6 +12,11 @@ For more information, documentation, help or support, go here: http://truenas.com +Warning: the supported mechanisms for making configuration changes +are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE +NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY +RESULT IN SYSTEM FAILURE. + % if motd: ${motd} % endif