浏览代码

fix "mainentance" typo

master
父节点
当前提交
1b51b6d203
共有 10 个文件被更改,包括 82 次插入63 次删除
  1. +2
    -2
      defaults/main.yml
  2. +17
    -0
      tasks/cleanup-litter.yaml
  3. +4
    -2
      tasks/main.yml
  4. +0
    -44
      tasks/mainentance.yml
  5. +44
    -0
      tasks/maintenance.yml
  6. +5
    -5
      templates/lightdm.conf.j2
  7. +0
    -8
      templates/mainentance.desktop.j2
  8. +2
    -2
      templates/maintenance-xsession.sh.j2
  9. +8
    -0
      templates/maintenance.desktop.j2
  10. +0
    -0
      templates/maintenance.xbindkeys.j2

+ 2
- 2
defaults/main.yml 查看文件

@@ -1,7 +1,7 @@
display_manager_state: multiuser

display_manager_mainentance_text: Wartungsmodus – bitte nicht abschalten!
display_manager_mainentance_icon: preferences-system
display_manager_maintenance_text: Wartungsmodus – bitte nicht abschalten!
display_manager_maintenance_icon: preferences-system

display_manager_background_image: Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg
# source: https://upload.wikimedia.org/wikipedia/commons/5/52/Hubble2005-01-barred-spiral-galaxy-NGC1300.jpg

+ 17
- 0
tasks/cleanup-litter.yaml 查看文件

@@ -0,0 +1,17 @@
---

# to be removed when roled out
- name: remove wrong "mainentance" directory
file:
path: /usr/local/share/mainentance
state: absent

- name: remove wrong "mainentance" user
user:
name: mainentance
state: absent

- name: remove wrong "mainentance" user home directory
file:
path: /var/lib/mainentance
state: absent

+ 4
- 2
tasks/main.yml 查看文件

@@ -24,8 +24,8 @@
- onboard
notify: restart lightdm

- include: mainentance.yml
when: display_manager_state == 'mainentance'
- import_tasks: maintenance.yml
when: display_manager_state == 'maintenance'

- name: lightdm configuration
template:
@@ -64,3 +64,5 @@
enabled: yes

- meta: flush_handlers

- import_tasks: cleanup-litter.yaml

+ 0
- 44
tasks/mainentance.yml 查看文件

@@ -1,44 +0,0 @@
---

- name: install mainentance mode packages
apt:
pkg: "{{ item }}"
state: installed
with_items:
- yad
- xbindkeys
- feh
notify: restart lightdm

- name: mainentance user
user:
name: mainentance
system: yes
createhome: yes
home: /var/lib/mainentance
notify: restart lightdm

- name: mainentance directory
file:
path: /usr/local/share/mainentance
state: directory
notify: restart lightdm

- name: mainentance xsession desktop
template:
src: mainentance.desktop.j2
dest: /usr/local/share/mainentance/mainentance.desktop
notify: restart lightdm

- name: mainentance xsession script
template:
src: mainentance-xsession.sh.j2
dest: /usr/local/share/mainentance/xsession
mode: u=rwx,g=rx,o=rx
notify: restart lightdm

- name: mainentance xbindkeys
template:
src: mainentance.xbindkeys.j2
dest: /usr/local/share/mainentance/xbindkeys
notify: restart lightdm

+ 44
- 0
tasks/maintenance.yml 查看文件

@@ -0,0 +1,44 @@
---

- name: install maintenance mode packages
apt:
pkg: "{{ item }}"
state: installed
with_items:
- yad
- xbindkeys
- feh
notify: restart lightdm

- name: maintenance user
user:
name: maintenance
system: yes
createhome: yes
home: /var/lib/maintenance
notify: restart lightdm

- name: maintenance directory
file:
path: /usr/local/share/maintenance
state: directory
notify: restart lightdm

- name: maintenance xsession desktop
template:
src: maintenance.desktop.j2
dest: /usr/local/share/maintenance/maintenance.desktop
notify: restart lightdm

- name: maintenance xsession script
template:
src: maintenance-xsession.sh.j2
dest: /usr/local/share/maintenance/xsession
mode: u=rwx,g=rx,o=rx
notify: restart lightdm

- name: maintenance xbindkeys
template:
src: maintenance.xbindkeys.j2
dest: /usr/local/share/maintenance/xbindkeys
notify: restart lightdm

+ 5
- 5
templates/lightdm.conf.j2 查看文件

@@ -20,8 +20,8 @@
# backup-logs = True to move add a .old suffix to old log files when opening new ones
#
[LightDM]
{% if display_manager_state == "mainentance" %}
sessions-directory=/usr/local/share/mainentance
{% if display_manager_state == "maintenance" %}
sessions-directory=/usr/local/share/maintenance
{% endif %}

#
@@ -76,10 +76,10 @@ sessions-directory=/usr/local/share/mainentance
[Seat:*]
greeter-session=lightdm-gtk-greeter

{% if display_manager_state == "mainentance" %}
autologin-user=mainentance
{% if display_manager_state == "maintenance" %}
autologin-user=maintenance
autologin-user-timeout=0
user-session=mainentance
user-session=maintenance
{% endif %}

{% if display_setup_commands is defined %}


+ 0
- 8
templates/mainentance.desktop.j2 查看文件

@@ -1,8 +0,0 @@
[Desktop Entry]
Name=mainentance
Comment=mainentance xsession
Exec=/usr/local/share/mainentance/xsession
Type=Application
X-LightDM-DesktopName=mainentance
DesktopNames=mainentance
Keywords=wm;windowmanager;window;manager;

templates/mainentance-xsession.sh.j2 → templates/maintenance-xsession.sh.j2 查看文件

@@ -3,5 +3,5 @@
xset -dpms
xset s off
feh --bg-scale "{{display_manager_background_image_path}}"
xbindkeys -f /usr/local/share/mainentance/xbindkeys &
exec yad --no-buttons --no-escape --image-on-top --center --borders 50 --image="{{display_manager_mainentance_icon}}" --text="{{display_manager_mainentance_text}}"
xbindkeys -f /usr/local/share/maintenance/xbindkeys &
exec yad --no-buttons --no-escape --image-on-top --center --borders 50 --image="{{display_manager_maintenance_icon}}" --text="{{display_manager_maintenance_text}}"

+ 8
- 0
templates/maintenance.desktop.j2 查看文件

@@ -0,0 +1,8 @@
[Desktop Entry]
Name=maintenance
Comment=maintenance xsession
Exec=/usr/local/share/maintenance/xsession
Type=Application
X-LightDM-DesktopName=maintenance
DesktopNames=maintenance
Keywords=wm;windowmanager;window;manager;

templates/mainentance.xbindkeys.j2 → templates/maintenance.xbindkeys.j2 查看文件


正在加载...
取消
保存