evolinux-base: better regexp for fstab customization
- we must exclude lines containing a # before the partition name - it's better to use "not space" (\S) instead of "word character" (\w) between the partition name and the fs type
This commit is contained in:
parent
de9d4080cb
commit
fad4b78775
|
@ -12,7 +12,7 @@
|
||||||
- name: /home partition is customized
|
- name: /home partition is customized
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '(\s+/home\s+\w+\s+)([a-z,]+)(\s+)'
|
regexp: '([^#]\s+/home\s+\S+\s+)([a-z,]+)(\s+)'
|
||||||
replace: '\1{{ evolinux_fstab_home_options | mandatory }}\3'
|
replace: '\1{{ evolinux_fstab_home_options | mandatory }}\3'
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: remount /home
|
notify: remount /home
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
- name: /tmp partition is customized
|
- name: /tmp partition is customized
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '(\s+/tmp\s+\w+\s+)([a-z,]+)(\s+)'
|
regexp: '([^#]\s+/tmp\s+\S+\s+)([a-z,]+)(\s+)'
|
||||||
replace: '\1{{ evolinux_fstab_tmp_options | mandatory }}\3'
|
replace: '\1{{ evolinux_fstab_tmp_options | mandatory }}\3'
|
||||||
backup: yes
|
backup: yes
|
||||||
when:
|
when:
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
- name: /usr partition is customized
|
- name: /usr partition is customized
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '(\s+/usr\s+\w+\s+)([a-z,]+)(\s+)'
|
regexp: '([^#]\s+/usr\s+\S+\s+)([a-z,]+)(\s+)'
|
||||||
replace: '\1{{ evolinux_fstab_usr_options | mandatory }}\3'
|
replace: '\1{{ evolinux_fstab_usr_options | mandatory }}\3'
|
||||||
backup: yes
|
backup: yes
|
||||||
when:
|
when:
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
- name: /var partition is customized
|
- name: /var partition is customized
|
||||||
replace:
|
replace:
|
||||||
dest: /etc/fstab
|
dest: /etc/fstab
|
||||||
regexp: '(\s+/var\s+\w+\s+)([a-z,]+)(\s+)'
|
regexp: '([^#]\s+/var\s+\S+\s+)([a-z,]+)(\s+)'
|
||||||
replace: '\1{{ evolinux_fstab_var_options | mandatory }}\3'
|
replace: '\1{{ evolinux_fstab_var_options | mandatory }}\3'
|
||||||
backup: yes
|
backup: yes
|
||||||
notify: remount /var
|
notify: remount /var
|
||||||
|
|
Loading…
Reference in a new issue