From 01ed3c4fe54548ca0c2848c4ecee3525c7dabc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 28 Jan 2015 21:07:42 +0100 Subject: 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 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 3096989468..f54e3d3a35 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 +;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; ;;; 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")) -- cgit v1.2.1