summaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-01-28 21:07:42 +0100
committerLudovic Courtès <ludo@gnu.org>2015-01-28 21:32:58 +0100
commit01ed3c4fe54548ca0c2848c4ecee3525c7dabc36 (patch)
treeb21b90fdc14c4339bea99ca24f92535715b227b6 /gnu/build/linux-boot.scm
parent9250b30466c17747a32f215551ded8dc52bc2c32 (diff)
linux-boot: Don't fail if /root/etc/mtab is a dangling symlink.
Reported Joshua Grant. Patch suggested by Mark H Weaver. * gnu/build/linux-boot.scm (mount-root-file-system): Use 'false-if-exception' instead of 'when (file-exists? ...)' to account for dangling symlinks.
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r--gnu/build/linux-boot.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 30969894680..f54e3d3a358 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -1,5 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3;;; 3;;;
4;;; This file is part of GNU Guix. 4;;; This file is part of GNU Guix.
5;;; 5;;;
@@ -276,7 +276,7 @@ UNIONFS."
276 (mount root "/root" type))) 276 (mount root "/root" type)))
277 277
278 ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts. 278 ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
279 (when (file-exists? "/root/etc/mtab") 279 (false-if-exception
280 (delete-file "/root/etc/mtab")) 280 (delete-file "/root/etc/mtab"))
281 (symlink "/proc/self/mounts" "/root/etc/mtab")) 281 (symlink "/proc/self/mounts" "/root/etc/mtab"))
282 282