diff options
Diffstat (limited to 'manifests/subsystem')
-rw-r--r-- | manifests/subsystem/hibernate.pp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/manifests/subsystem/hibernate.pp b/manifests/subsystem/hibernate.pp new file mode 100644 index 0000000..a036519 --- /dev/null +++ b/manifests/subsystem/hibernate.pp @@ -0,0 +1,46 @@ +class nodo::subsystem::hibernate( + $enable = false, +) { + package { 'uswsusp': + ensure => $enable ? { + false => absent, + default => present, + }, + } + + file { "/etc/initramfs-tools/conf.d/resume": + owner => "root", + group => "root", + mode => 0644, + content => "RESUME=/dev/mapper/swap\n", + notify => Exec['update-initramfs'], + ensure => $enable ? { + false => absent, + default => present, + }, + } + + file { "/etc/uswsusp.conf": + owner => "root", + group => "root", + mode => 0644, + source => 'puppet:///modules/nodo/etc/uswsusp.conf', + require => Package['uswsusp'], + ensure => $enable ? { + false => absent, + default => present, + }, + } + + file { "/etc/pm/config.d/00sleep_module": + owner => "root", + group => "root", + mode => 0644, + content => "SLEEP_MODULE=\"uswsusp\"\n", + require => Package['uswsusp'], + ensure => $enable ? { + false => absent, + default => present, + }, + } +} |