[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
16/21: installer: Prevent the user specifying the same mount point twice
From: |
John Darrington |
Subject: |
16/21: installer: Prevent the user specifying the same mount point twice. |
Date: |
Sat, 31 Dec 2016 14:54:18 +0000 (UTC) |
jmd pushed a commit to branch wip-installer
in repository guix.
commit db6428aafe23dcd599710a74ac7425933ee94216
Author: John Darrington <address@hidden>
Date: Fri Dec 30 15:01:31 2016 +0100
installer: Prevent the user specifying the same mount point twice.
* gnu/system/installer/filesystems.scm (filesystem-task-incomplete): Add the
condition that no mount point may appear more than once.
---
gnu/system/installer/filesystems.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gnu/system/installer/filesystems.scm
b/gnu/system/installer/filesystems.scm
index 0f67342..4297ef3 100644
--- a/gnu/system/installer/filesystems.scm
+++ b/gnu/system/installer/filesystems.scm
@@ -51,6 +51,17 @@
(and (not (find-mount-device "/" mount-points))
(N_ "You must specify a mount point for the root (/)."))
+ (let loop ((ll mount-points)
+ (ac '()))
+ (match ll
+ ('() #f)
+ (((_ . directory) . rest)
+ (if (member directory ac)
+ (format #f
+ (N_ "You have specified the mount point ~a more than
once.")
+ directory)
+ (loop rest (cons directory ac))))))
+
(let ((partitions-without-filesystems
(fold (lambda (x prev)
(if (not (string-prefix? "ext"
- branch wip-installer updated (d654694 -> d5eb580), John Darrington, 2016/12/31
- 03/21: installer: Add inetutils bin directory to PATH., John Darrington, 2016/12/31
- 05/21: installer: Enable scrolling in the installation window., John Darrington, 2016/12/31
- 06/21: installer: Wrap installer in (catch #t ...), John Darrington, 2016/12/31
- 16/21: installer: Prevent the user specifying the same mount point twice.,
John Darrington <=
- 04/21: installer: Turn off kernel ring messages to console., John Darrington, 2016/12/31
- 01/21: installer: Add wireless-tools bin directory to PATH., John Darrington, 2016/12/31
- 02/21: installer: Replace an instance of cdr with match., John Darrington, 2016/12/31
- 12/21: installer: Close unused ports in pipe-cmd., John Darrington, 2016/12/31
- 08/21: installer: Use consistent window heights., John Darrington, 2016/12/31
- 20/21: installer: Do not use /tmp for holding the configuration., John Darrington, 2016/12/31
- 14/21: installer: Issue message to user on failure of filesystems task., John Darrington, 2016/12/31
- 07/21: installer: Rename module "new" to "guixsd-installer"., John Darrington, 2016/12/31
- 13/21: installer: Replace spawned mount command with the mount syscall., John Darrington, 2016/12/31
- 11/21: installer: Improve install page., John Darrington, 2016/12/31