Skip to content

Commit 1def94b

Browse files
fix(jinja): fix generated iscsi.conf
1 parent 1645c53 commit 1def94b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

iscsi/initiator/config/files/default/iscsi.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
{%- if value is mapping %}
1717
{{shift}}{{ key }} { # nickname
1818
{{ readconf(value, spaces|int+4) }}
19+
}
1920
{%- elif value is string or value is number %}
2021
{{shift}}{{ key }} = {{"'" if value is not string else ''}}{{ value }}{{"'" if value is not string else ''}}
2122
{% endif %}

iscsi/initiator/config/files/default/open-iscsi.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
{%- macro openiscsi(key, value, spaces=0) -%}
1515
{%- set shift = spaces * ' ' -%}
16-
{{shift}}{{ key }} = {{"'" if value is not string else ''}}{{ value }}{{"'" if value is not string else ''}}
17-
{%- endmacro -%}
16+
{{shift}}{{ key }} = {{ value ~ '\n' if value is string else '"' ~ value ~ '"\n' }}
17+
{%- endmacro %}
1818

1919
{{ readconf(data, 0) }}
2020

0 commit comments

Comments
 (0)