aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/mapped-devices.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-06-10 02:57:50 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-06-10 02:57:50 +0200
commitea45e2c500c7ed5b22ea5c21516db40dfd8fbd0b (patch)
treec743e4905419232e6a342694760bf446cd41b5d4 /gnu/system/mapped-devices.scm
parent202342fdda708d8e4554e0514a58849584eddbd0 (diff)
parent8caf5bac4c89512793276054770386c343c73e7b (diff)
downloadpatches-ea45e2c500c7ed5b22ea5c21516db40dfd8fbd0b.tar
patches-ea45e2c500c7ed5b22ea5c21516db40dfd8fbd0b.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/system/mapped-devices.scm')
-rw-r--r--gnu/system/mapped-devices.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index 2959802c96..18b9f5b4b6 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -114,7 +115,16 @@
;; udev-populated /dev/disk/by-id directory but udev may
;; be unavailable at the time we run this.
(if (bytevector? source)
- (or (find-partition-by-luks-uuid source)
+ (or (let loop ((tries-left 10))
+ (and (positive? tries-left)
+ (or (find-partition-by-luks-uuid source)
+ ;; If the underlying partition is
+ ;; not found, try again after
+ ;; waiting a second, up to ten
+ ;; times. FIXME: This should be
+ ;; dealt with in a more robust way.
+ (begin (sleep 1)
+ (loop (- tries-left 1))))))
(error "LUKS partition not found" source))
source)