Merge branch 'console' into 'master'
Support for serial text consoles
this PR is for following:
issue/528
to have it enabled, you need smth like:
```
parameters:
linux:
system:
console:
ttyS0:
autologin: root
rate: 115200
term: xterm
```
See merge request !10
diff --git a/README.rst b/README.rst
index ef255e3..cd43da2 100644
--- a/README.rst
+++ b/README.rst
@@ -166,6 +166,18 @@
headers: true
version: 4.2.0-22
+Systcl kernel parameters
+
+.. code-block:: yaml
+
+ linux:
+ system:
+ kernel:
+ sysctl:
+ net.ipv4.tcp_keepalive_intvl: 3
+ net.ipv4.tcp_keepalive_time: 30
+ net.ipv4.tcp_keepalive_probes: 8
+
Repositories
~~~~~~~~~~~~
diff --git a/linux/storage/mount.sls b/linux/storage/mount.sls
index f9c04b6..09a3c9b 100644
--- a/linux/storage/mount.sls
+++ b/linux/storage/mount.sls
@@ -5,7 +5,7 @@
{%- if mount.enabled %}
-{%- if not mount.file_system in ['nfs'] %}
+{%- if not mount.file_system in ['nfs', 'nfs4'] %}
mkfs_{{ mount.device}}:
cmd.run:
diff --git a/linux/storage/swap.sls b/linux/storage/swap.sls
index 7ed70bf..f2e3a2d 100644
--- a/linux/storage/swap.sls
+++ b/linux/storage/swap.sls
@@ -10,8 +10,7 @@
linux_create_swap_partition_{{ swap.device }}:
cmd.run:
- name: 'mkswap {{ swap.device }}'
- - onlyif: "test `file -L -s {{ swap.device }} | grep 'swap file' >/dev/null;echo $?` -ne 0"
- - creates: {{ swap.device }}
+ - unless: file -L -s {{ swap.device }} | grep -q 'swap file'
linux_set_swap_partition_{{ swap.device }}:
cmd.run:
diff --git a/linux/system/kernel.sls b/linux/system/kernel.sls
index 94a12f4..ef8849f 100644
--- a/linux/system/kernel.sls
+++ b/linux/system/kernel.sls
@@ -24,22 +24,17 @@
- watch:
- pkg: linux_kernel_package
-{%- else %}
-
-linux_kernel_package:
- pkg.latest:
- - names:
- - linux-image-{{ system.kernel.type|default('generic') }}{% if system.kernel.get('lts', False) %}-lts-{{ system.kernel.lts }}{% endif %}
- {%- if system.kernel.get('headers', False) %}
- - linux-headers-{{ system.kernel.type|default('generic') }}{% if system.kernel.get('lts', False) %}-lts-{{ system.kernel.lts }}{% endif %}
- {%- endif %}
- {%- if system.kernel.get('extra', False) %}
- - linux-image-extra-{{ system.kernel.type|default('generic') }}{% if system.kernel.get('lts', False) %}-lts-{{ system.kernel.lts }}{% endif %}
- {%- endif %}
- - refresh: true
-
{%- endif %}
+{%- for sysclt_name, sysctl_value in system.kernel.get('sysctl', {}).iteritems() %}
+
+linux_kernel_{{ sysclt_name }}:
+ sysctl.present:
+ - name: {{ sysclt_name }}
+ - value: {{ sysctl_value }}
+
+{%- endfor %}
+
{%- endif %}
{%- endif %}