From fc4c2170321d412357501b14431840a74791b152 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 15 May 2014 14:54:17 -0300 Subject: Adding back hibernation support --- files/etc/uswsusp.conf | 8 ++++++++ manifests/base/laptop.pp | 12 ++++++++++++ manifests/utils/laptop/debian.pp | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 files/etc/uswsusp.conf diff --git a/files/etc/uswsusp.conf b/files/etc/uswsusp.conf new file mode 100644 index 0000000..fcb7371 --- /dev/null +++ b/files/etc/uswsusp.conf @@ -0,0 +1,8 @@ +# /etc/uswsusp.conf(5) -- Configuration file for s2disk/s2both +resume device = /dev/mapper/cswap +splash = y +compress = y +early writeout = y +image size = 1763583180 +RSA key file = /etc/uswsusp.key +shutdown method = platform diff --git a/manifests/base/laptop.pp b/manifests/base/laptop.pp index 4e07e80..3074787 100644 --- a/manifests/base/laptop.pp +++ b/manifests/base/laptop.pp @@ -31,6 +31,18 @@ class nodo::base::laptop inherits nodo::base::personal { }, } + file { "/etc/uswsusp.conf": + owner => "root", + group => "root", + mode => 0644, + source => 'puppet:///modules/nodo/etc/uswsusp.conf', + require => package['uswsusp'], + ensure => $hibernate ? { + false => absent, + default => present, + }, + } + # Avoid this annoying warning # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673818 file { '/etc/laptop-mode/conf.d/board-specific': diff --git a/manifests/utils/laptop/debian.pp b/manifests/utils/laptop/debian.pp index a4ef0e0..d584e1a 100644 --- a/manifests/utils/laptop/debian.pp +++ b/manifests/utils/laptop/debian.pp @@ -7,7 +7,7 @@ class nodo::utils::laptop::debian { 'btscanner', 'laptop-mode-tools', 'acpi-support', 'tftp', 'sharutils', 'wireshark', 'macchanger', 'weplab', 'wpagui', - 'gnokii', 'sslstrip' ]: + 'gnokii', 'sslstrip', 'uswsusp' ]: ensure => installed, } -- cgit v1.2.3