Переглянути джерело

Fix system-wide prompt

tags/2016.12
Filip Pytloun 9 роки тому
джерело
коміт
973163e2ea
2 змінених файлів з 4 додано та 4 видалено
  1. +1
    -1
      linux/files/prompt.sh
  2. +3
    -3
      linux/system/prompt.sls

+ 1
- 1
linux/files/prompt.sh Переглянути файл

@@ -7,7 +7,7 @@
[[ $- == *i* ]] || return 0

{%- for user, prompt in system.prompt.iteritems() %}
{% if user != default %}
{% if user != "default" %}
if [ "$USERNAME" == "{{ user }}" ]; then
export PS1="{{ prompt }} "
return 0

+ 3
- 3
linux/system/prompt.sls Переглянути файл

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

/etc/skel/.bashrc:
file.replace:
- 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"
- repl: ": # Prompt is set by /etc/profile.d/prompt.sh"

{%- endif %}

Завантаження…
Відмінити
Зберегти