From 601ad15d992700aebb1f0fa1730f26f9a8bd83da Mon Sep 17 00:00:00 2001 From: Steve Traylen Date: Tue, 3 Dec 2024 09:53:59 +0100 Subject: [PATCH] Correct UMask in mkswap example Without a correct UMask set the `mkswap` example fails due to permissions being too relaxed. --- REFERENCE.md | 3 ++- manifests/manage_unit.pp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 554f2dfc..5947b731 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1415,7 +1415,8 @@ systemd::manage_unit{'mkswap.service': 'ConditionPathExists' => '!/swapfile', }, service_entry => { - 'type' => 'oneshot', + 'Type' => 'oneshot', + 'UMask' => '0177', 'ExecStart' => [ '/usr/bin/dd if=/dev/zero of=/swapfile bs=1024 count=1000', '/usr/sbin/mkswap /swapfile', diff --git a/manifests/manage_unit.pp b/manifests/manage_unit.pp index be53f7e4..aa92acf5 100644 --- a/manifests/manage_unit.pp +++ b/manifests/manage_unit.pp @@ -110,7 +110,8 @@ # 'ConditionPathExists' => '!/swapfile', # }, # service_entry => { -# 'type' => 'oneshot', +# 'Type' => 'oneshot', +# 'UMask' => '0177', # 'ExecStart' => [ # '/usr/bin/dd if=/dev/zero of=/swapfile bs=1024 count=1000', # '/usr/sbin/mkswap /swapfile',