Browse Source

Fix unless in linux.console

tags/2016.12
Filip Pytloun 9 years ago
parent
commit
f41f161a41
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      linux/system/console.sls

+ 2
- 4
linux/system/console.sls View File

autologin_{{ tty_name }}_enable: autologin_{{ tty_name }}_enable:
cmd.run: cmd.run:
- name: "sed -i 's|/sbin/getty|/sbin/getty --autologin {{ console.autologin }}|g' /etc/init/{{ tty_name }}.conf" - name: "sed -i 's|/sbin/getty|/sbin/getty --autologin {{ console.autologin }}|g' /etc/init/{{ tty_name }}.conf"
- unless: |
"grep '\-\-autologin' /etc/init/{{ tty_name }}.conf"
- unless: "grep 'autologin' /etc/init/{{ tty_name }}.conf"
{%- else %} {%- else %}
autologin_{{ tty_name }}_disable: autologin_{{ tty_name }}_disable:
cmd.run: cmd.run:
- name: "sed -i 's| \-\-autologin [a-zA-Z0-9]*||g' /etc/init/{{ tty_name }}.conf" - name: "sed -i 's| \-\-autologin [a-zA-Z0-9]*||g' /etc/init/{{ tty_name }}.conf"
- onlyif: |
"grep '\-\-autologin' /etc/init/{{ tty_name }}.conf"
- onlyif: "grep 'autologin' /etc/init/{{ tty_name }}.conf"
{%- endif %} {%- endif %}


{%- endfor %} {%- endfor %}

Loading…
Cancel
Save