summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/services/base.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 20736eb13f..ba01f5d764 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2225,8 +2225,10 @@ instance."
                      (and device
                           (begin
                             (restart-on-EINTR (swapon device
-                                                      #$(swap-space->flags-bit-mask
-                                                         swap)))
+                                                      #$(if (swap-space? swap)
+                                                            (swap-space->flags-bit-mask
+                                                             swap)
+                                                            0)))
                             #t)))))
         (stop #~(lambda _
                   (let ((device #$device-lookup))