From fad4b78775be57f7eb3d5ffb16bfbdd72cfab942 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 14 Apr 2017 12:10:52 +0200 Subject: [PATCH] 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 --- evolinux-base/tasks/fstab.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/evolinux-base/tasks/fstab.yml b/evolinux-base/tasks/fstab.yml index 120d3661..42ebb79d 100644 --- a/evolinux-base/tasks/fstab.yml +++ b/evolinux-base/tasks/fstab.yml @@ -12,7 +12,7 @@ - name: /home partition is customized replace: 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' backup: yes notify: remount /home @@ -23,7 +23,7 @@ - name: /tmp partition is customized replace: 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' backup: yes when: @@ -33,7 +33,7 @@ - name: /usr partition is customized replace: 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' backup: yes when: @@ -43,7 +43,7 @@ - name: /var partition is customized replace: 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' backup: yes notify: remount /var