Bläddra i källkod

Fix unless in linux.console

tags/2016.12
Filip Pytloun 9 år sedan
förälder
incheckning
f41f161a41
1 ändrade filer med 2 tillägg och 4 borttagningar
  1. +2
    -4
      linux/system/console.sls

+ 2
- 4
linux/system/console.sls Visa fil

@@ -9,14 +9,12 @@
autologin_{{ tty_name }}_enable:
cmd.run:
- 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 %}
autologin_{{ tty_name }}_disable:
cmd.run:
- 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 %}

{%- endfor %}

Laddar…
Avbryt
Spara