From 1ef79ec2c7bddc0091e0fd476dff19f2f976d03f Mon Sep 17 00:00:00 2001 From: N Date: Wed, 18 Sep 2019 00:14:51 +0100 Subject: [PATCH] fix(freebsd): required changes for freebsd 11.2 --- docs/README.rst | 14 +++++++------- iscsi/initiator/service/clean.sls | 2 +- iscsi/initiator/service/install.sls | 11 +++++------ iscsi/target/service/clean.sls | 2 +- iscsi/target/service/install.sls | 11 +++++------ 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/docs/README.rst b/docs/README.rst index bdc98fe9..afc7dc45 100644 --- a/docs/README.rst +++ b/docs/README.rst @@ -16,13 +16,6 @@ iscsi-formula Configure iSCSI targets and initiator on GNU/Linux and FreeBSD. -Technology ----------- -.. image:: docs/link-transport-storage-protocols.png - :target: https://github.com/saltstack-formulas/iscsi-formula - :scale: 25 % - :alt: Link/Transport and Storage protocol infographic - .. contents:: **Table of Contents** General notes @@ -46,6 +39,13 @@ Contributing to this repo Please see :ref:`How to contribute ` for more details. +Scope +----- +.. image:: docs/link-transport-storage-protocols.png + :target: https://github.com/saltstack-formulas/iscsi-formula + :scale: 25 % + :alt: Link/Transport and Storage protocol infographic + Available states ---------------- diff --git a/iscsi/initiator/service/clean.sls b/iscsi/initiator/service/clean.sls index 065a557e..213e8045 100644 --- a/iscsi/initiator/service/clean.sls +++ b/iscsi/initiator/service/clean.sls @@ -18,7 +18,7 @@ iscsi-initiator-service-clean-service-dead iscsi-initiator-service-install-file-line-freebsd: file.line: - - onlyif: {{ grains.os == 'FreeBSD' }} + - onlyif: {{ grains.os_family == 'FreeBSD' }} - name: {{ iscsi.config.name.modprobe }} - content: 'ctld_env="-u"' - mode: delete diff --git a/iscsi/initiator/service/install.sls b/iscsi/initiator/service/install.sls index 51523a97..9f8154f4 100644 --- a/iscsi/initiator/service/install.sls +++ b/iscsi/initiator/service/install.sls @@ -9,19 +9,18 @@ include: - {{ sls_config_install }} - {%- if grains.os == 'FreeBSD' %} + {%- if grains.os_family == 'FreeBSD' %} iscsi-initiator-service-install-file-line-freebsd: file.line: - name: {{ iscsi.config.name.modprobe }} - content: 'ctld_env="-u"' - backup: True - {%- if not iscsi.initiator.enabled %} - - mode: delete - {%- else %} + {%- if iscsi.initiator.enabled %} - mode: ensure - - after: 'sshd_enable.*' - - create: True + - after: 'autoboot_delay.*' + {%- else %} + - mode: delete {%- endif %} {%- endif %} diff --git a/iscsi/target/service/clean.sls b/iscsi/target/service/clean.sls index 8dde7e3b..50d8f598 100644 --- a/iscsi/target/service/clean.sls +++ b/iscsi/target/service/clean.sls @@ -18,7 +18,7 @@ iscsi-target-service-clean-service-dead iscsi-target-service-install-file-line-freebsd: file.line: - - onlyif: {{ grains.os == 'FreeBSD' }} + - onlyif: {{ grains.os_family == 'FreeBSD' }} - name: {{ iscsi.config.name.modprobe }} - content: 'ctld_env="-u"' - mode: delete diff --git a/iscsi/target/service/install.sls b/iscsi/target/service/install.sls index 9eb64669..2098ed24 100644 --- a/iscsi/target/service/install.sls +++ b/iscsi/target/service/install.sls @@ -9,18 +9,17 @@ include: - {{ sls_config_install }} - {%- if grains.os == 'FreeBSD' %} + {%- if grains.os_family == 'FreeBSD' %} iscsi-target-service-install-file-line-freebsd: file.line: - name: {{ iscsi.config.name.modprobe }} - content: 'ctld_env="-u"' - backup: True - {%- if not iscsi.target.enabled %} - - mode: delete - {%- else %} + {%- if iscsi.target.enabled %} - mode: ensure - - after: 'sshd_enable.*' - - create: True + - after: 'autoboot_delay.*' + {%- else %} + - mode: delete {%- endif %} {%- endif %}