guix-commits
[Top][All Lists]
Advanced

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

03/04: linux-boot: Don't fail if /root/etc/mtab is a dangling symlink.


From: Ludovic Courtès
Subject: 03/04: linux-boot: Don't fail if /root/etc/mtab is a dangling symlink.
Date: Wed, 28 Jan 2015 20:33:06 +0000

civodul pushed a commit to branch master
in repository guix.

commit 01ed3c4fe54548ca0c2848c4ecee3525c7dabc36
Author: Ludovic Courtès <address@hidden>
Date:   Wed Jan 28 21:07:42 2015 +0100

    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.
---
 gnu/build/linux-boot.scm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 3096989..f54e3d3 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -276,7 +276,7 @@ UNIONFS."
         (mount root "/root" type)))
 
   ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
-  (when (file-exists? "/root/etc/mtab")
+  (false-if-exception
     (delete-file "/root/etc/mtab"))
   (symlink "/proc/self/mounts" "/root/etc/mtab"))
 



reply via email to

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