-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[raspbian] Improved readability of templates
- Loading branch information
Ritwick DSouza
committed
Jul 20, 2017
1 parent
c364a94
commit a194980
Showing
3 changed files
with
101 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
{% for wireless in data.wireless %} | ||
# config: /etc/hostapd/hostapd.conf | ||
|
||
interface={{ wireless.get('ifname') }} | ||
interface={{ wireless.ifname }} | ||
driver=nl80211 | ||
{% if wireless.get('protocol') == 'a' or 'b' or 'g' %} | ||
hw_mode={{ wireless.get('hwmode')}} | ||
{% if wireless.protocol == 'a' or 'b' or 'g' %} | ||
hw_mode={{ wireless.hwmode }} | ||
{% endif %} | ||
channel={{ wireless.get('channel')}} | ||
{% if wireless.get('protocol') == '80211n' %} | ||
channel={{ wireless.channel }} | ||
{% if wireless.protocol == '80211n' %} | ||
ieee80211n=1 | ||
{% endif %} | ||
{% if wireless.get('protocol') == '80211ac' %} | ||
{% if wireless.protocol == '80211ac' %} | ||
ieee80211ac=1 | ||
{% endif %} | ||
ssid={{ wireless.get('ssid') }} | ||
{% if wireless.get('encryption') != {} %} | ||
auth_algs={{ wireless.get('encryption').get('auth_algs') }} | ||
wpa={{ wireless.get('encryption').get('wpa') }} | ||
wpa_key_mgmt={{ wireless.get('encryption').get('wpa_key_mgmt') }} | ||
wpa_passphrase={{ wireless.get('encryption').get('wpa_passphrase') }} | ||
{% if wireless.get('encryption', None).get('wpa_pairwise') != 'AUTO' %} | ||
wpa_pairwise={{ wireless.get('encryption').get('wpa_pairwise')}} | ||
ssid={{ wireless.ssid }} | ||
{% if wireless.encryption %} | ||
auth_algs={{ wireless.encryption.auth_algs }} | ||
wpa={{ wireless.encryption.wpa }} | ||
wpa_key_mgmt={{ wireless.encryption.wpa_key_mgmt }} | ||
wpa_passphrase={{ wireless.encryption.wpa_passphrase }} | ||
{% if wireless.encryption.wpa_pairwise != 'AUTO' %} | ||
wpa_pairwise={{ wireless.encryption.wpa_pairwise }} | ||
{% endif %} | ||
{% endif %} | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
{% for general in data.general %} | ||
{% if general.get('hostname') %} | ||
# config: /etc/hostname | ||
{% if data.general and data.general[0].hostname %} | ||
# config: /etc/hostname | ||
|
||
{{ general.get('hostname') }} | ||
|
||
{% endif %} | ||
{% endfor %} | ||
{{ data.general[0].hostname }} | ||
|
||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters