guix-commits
[Top][All Lists]
Advanced

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

01/02: squash! system: hurd: Add swap-services to hurd-default-essential


From: guix-commits
Subject: 01/02: squash! system: hurd: Add swap-services to hurd-default-essential-services.
Date: Thu, 15 Jun 2023 08:21:47 -0400 (EDT)

janneke pushed a commit to branch hurd-team
in repository guix.

commit 31076886866e020df674e74a2d2f3d7b969cfc59
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Thu Jun 15 11:11:23 2023 +0200

    squash! system: hurd: Add swap-services to hurd-default-essential-services.
---
 gnu/services/base.scm | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 89aab1331e..3b7da33f85 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2483,16 +2483,21 @@ instance."
                    (let ((device #$device-lookup))
                      (and device
                           (begin
-                            (restart-on-EINTR (swapon device
-                                                      #$(if (swap-space? swap)
-                                                            
(swap-space->flags-bit-mask
-                                                             swap)
-                                                            0)))
+                            #$(if (target-hurd?)
+                                  #~(system* "swapon" device)
+                                  #~(restart-on-EINTR
+                                     (swapon device
+                                             #$(if (swap-space? swap)
+                                                   (swap-space->flags-bit-mask
+                                                    swap)
+                                                   0))))
                             #t)))))
         (stop #~(lambda _
                   (let ((device #$device-lookup))
                     (when device
-                      (restart-on-EINTR (swapoff device)))
+                      #$(if (target-hurd?)
+                            #~(system* "swapoff" device)
+                            #~(restart-on-EINTR (swapoff device))))
                     #f)))
         (respawn? #f))))
    (description "Turn on the virtual memory swap area.")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]