Przeglądaj źródła

Ensure PS1 is enforced for root

tags/2016.12
Filip Pytloun 9 lat temu
rodzic
commit
d9b68da2ed
3 zmienionych plików z 9 dodań i 4 usunięć
  1. +1
    -1
      README.rst
  2. +3
    -3
      linux/system/init.sls
  3. +5
    -0
      linux/system/prompt.sls

+ 1
- 1
README.rst Wyświetl plik

@@ -234,7 +234,7 @@ user can have different prompt.
On Debian systems to set prompt system-wide it's necessary to remove setting
PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from
``/etc/skel/.bashrc``). This formula will do this automatically, but will not
touch existing user's ``~/.bashrc`` files.
touch existing user's ``~/.bashrc`` files except root.

Linux network
-------------

+ 3
- 3
linux/system/init.sls Wyświetl plik

@@ -15,6 +15,9 @@ include:
{%- if system.locale is defined %}
- linux.system.locale
{%- endif %}
{%- if system.prompt is defined %}
- linux.system.prompt
{%- endif %}
{%- if system.user|length > 0 %}
- linux.system.user
{%- endif %}
@@ -45,6 +48,3 @@ include:
{%- if system.limit|length > 0 %}
- linux.system.limit
{%- endif %}
{%- if system.prompt is defined %}
- linux.system.prompt
{%- endif %}

+ 5
- 0
linux/system/prompt.sls Wyświetl plik

@@ -16,4 +16,9 @@
- pattern: ".*PS1=.*"
- repl: "# Prompt is set by /etc/profile.d/prompt.sh"

/root/.bashrc:
file.replace:
- pattern: ".*PS1=.*"
- repl: "# Prompt is set by /etc/profile.d/prompt.sh"

{%- endif %}

Ładowanie…
Anuluj
Zapisz