Subject: [bug#72920] [PATCH 2/3] services: cleanup: Create directories with the right mode upfront.

From: Ludovic Courtès <[email-masked]>
Date: Sat, 31 Aug 2024 21:47:23 +0200

* gnu/services.scm (cleanup-gexp): Pass mode as second argument to
‘mkdir’; remove ‘chmod’ calls.

Change-Id: I8ac2dde0ca5d9bd6b2ef104d77141d8463d8b3fa
---
 gnu/services.scm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index ce13c087ce..4a8e2b3b15 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -660,10 +660,8 @@ (define (cleanup-gexp _)
            (delete-file-recursively "/tmp")
            (delete-file-recursively "/var/run")
 
-           (mkdir "/tmp")
-           (chmod "/tmp" #o1777)
-           (mkdir "/var/run")
-           (chmod "/var/run" #o755)
+           (mkdir "/tmp" #o1777)
+           (mkdir "/var/run" #o755)
            (delete-file-recursively "/run/udev/watch.old"))))))
 
 (define cleanup-service-type
-- 
2.45.2