Browse Source

Ensure PS1 is enforced for root

tags/2016.12
Filip Pytloun 9 years ago
parent
commit
d9b68da2ed
3 changed files with 9 additions and 4 deletions
  1. +1
    -1
      README.rst
  2. +3
    -3
      linux/system/init.sls
  3. +5
    -0
      linux/system/prompt.sls

+ 1
- 1
README.rst View File

On Debian systems to set prompt system-wide it's necessary to remove setting On Debian systems to set prompt system-wide it's necessary to remove setting
PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from PS1 in ``/etc/bash.bashrc`` and ``~/.bashrc`` (which comes from
``/etc/skel/.bashrc``). This formula will do this automatically, but will not ``/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 Linux network
------------- -------------

+ 3
- 3
linux/system/init.sls View File

{%- if system.locale is defined %} {%- if system.locale is defined %}
- linux.system.locale - linux.system.locale
{%- endif %} {%- endif %}
{%- if system.prompt is defined %}
- linux.system.prompt
{%- endif %}
{%- if system.user|length > 0 %} {%- if system.user|length > 0 %}
- linux.system.user - linux.system.user
{%- endif %} {%- endif %}
{%- if system.limit|length > 0 %} {%- if system.limit|length > 0 %}
- linux.system.limit - linux.system.limit
{%- endif %} {%- endif %}
{%- if system.prompt is defined %}
- linux.system.prompt
{%- endif %}

+ 5
- 0
linux/system/prompt.sls View File

- pattern: ".*PS1=.*" - pattern: ".*PS1=.*"
- repl: "# Prompt is set by /etc/profile.d/prompt.sh" - 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 %} {%- endif %}

Loading…
Cancel
Save