[gnome-build-meta/valentindavid/disable-mail: 41/41] vm: Disable mail spool creation in useradd



commit 8fb34e8693d05e20f76cf07cbccf623c30c257b6
Author: Valentin David <valentin david codethink co uk>
Date:   Tue Apr 28 11:19:12 2020 +0200

    vm: Disable mail spool creation in useradd
    
    Otherwise it prints a non fatal error message.

 elements/vm/deps.bst         |  1 +
 elements/vm/disable-mail.bst | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
---
diff --git a/elements/vm/deps.bst b/elements/vm/deps.bst
index 6b3bd850..7157291a 100644
--- a/elements/vm/deps.bst
+++ b/elements/vm/deps.bst
@@ -13,6 +13,7 @@ runtime-depends:
 - vm/resize-root.bst
 - vm/spice-vdagent.bst
 - vm/wpa-supplicant-config.bst
+- vm/disable-mail.bst
 
 - freedesktop-sdk.bst:vm/config/pulseaudio.bst
 - freedesktop-sdk.bst:vm/config/sudo.bst
diff --git a/elements/vm/disable-mail.bst b/elements/vm/disable-mail.bst
new file mode 100644
index 00000000..8887a5c4
--- /dev/null
+++ b/elements/vm/disable-mail.bst
@@ -0,0 +1,15 @@
+kind: stack
+description: |
+  We do not have a local mail server so we should disable mail spool
+
+runtime-depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+public:
+  bst:
+    integration-commands:
+    - |
+      if [ -f /etc/default/useradd ]; then
+        sed -i '/^CREATE_MAIL_SPOOL/d' /etc/default/useradd
+        echo "CREATE_MAIL_SPOOL=no" >>/etc/default/useradd
+      fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]