diff --git a/shared/templates/mount_option/oval.template b/shared/templates/mount_option/oval.template index ac306495f206..ad19a4da18df 100644 --- a/shared/templates/mount_option/oval.template +++ b/shared/templates/mount_option/oval.template @@ -2,31 +2,66 @@ {{{ oval_metadata(MOUNTPOINT ~ " should be mounted with mount option " ~ MOUNTOPTION ~ ".") }}} - + + + + + {{% if MOUNT_HAS_TO_EXIST == "no" %}} - + + + + + {{% endif %}} + {{{ MOUNTPOINT }}} + + /etc/fstab + ^[\s]*[\S]+[\s]+{{{ POINTREGEX }}}[\s]+[\S]+[\s]+([\S]+) + 1 + + + {{% if not MOUNTOPTION_ARG_VAR %}} {{{ MOUNTOPTION }}} - {{% else %}} +{{% endif %}} + + 2 +{{% if not MOUNTOPTION_ARG_VAR %}} + {{{ MOUNTOPTION }}} +{{% else %}} + +{{% endif %}} + + +{{% if MOUNTOPTION_ARG_VAR %}} @@ -40,6 +75,7 @@ {{% endif %}} + @@ -47,11 +83,25 @@ - {{% if MOUNT_HAS_TO_EXIST == "no" %}} + + + + + + +{{% if MOUNT_HAS_TO_EXIST == "no" %}} - {{% endif %}} + + + + +{{% endif %}} diff --git a/shared/templates/mount_option/template.py b/shared/templates/mount_option/template.py index f4a714215462..e331c18240fd 100644 --- a/shared/templates/mount_option/template.py +++ b/shared/templates/mount_option/template.py @@ -5,6 +5,7 @@ def _mount_option(data, lang): if lang == "oval": data["pointid"] = ssg.utils.escape_id(data["mountpoint"]) + data["pointregex"] = ssg.utils.escape_regex(data["mountpoint"]) else: data["mountoption"] = re.sub(" ", ",", data["mountoption"]) return data