Merge pull request #52 from simonpasquier/support-loopback-storage

Add linux.storage.loopback state
diff --git a/README.rst b/README.rst
index 1c7d79b..14f0cb3 100644
--- a/README.rst
+++ b/README.rst
@@ -204,6 +204,21 @@
             net.ipv4.tcp_keepalive_time: 30
             net.ipv4.tcp_keepalive_probes: 8
 
+
+CPU
+~~~
+
+Disable ondemand cpu mode service:
+
+.. code-block:: yaml
+
+    linux:
+      system:
+        cpu:
+          governor: performance
+
+
+
 Repositories
 ~~~~~~~~~~~~
 
diff --git a/linux/system/cpu.sls b/linux/system/cpu.sls
new file mode 100644
index 0000000..658457d
--- /dev/null
+++ b/linux/system/cpu.sls
@@ -0,0 +1,9 @@
+{%- from "linux/map.jinja" import system with context %}
+{%- if system.cpu.governor is defined %}
+
+ondemand_service_disable:
+  service.dead:
+  - name: ondemand
+  - enable: false
+
+{%- endif %}
\ No newline at end of file
diff --git a/linux/system/init.sls b/linux/system/init.sls
index 96d2290..fabc37e 100644
--- a/linux/system/init.sls
+++ b/linux/system/init.sls
@@ -12,6 +12,9 @@
 {%- if system.kernel is defined %}
 - linux.system.kernel
 {%- endif %}
+{%- if system.cpu is defined %}
+- linux.system.cpu
+{%- endif %}
 {%- if system.locale|length > 0 %}
 - linux.system.locale
 {%- endif %}