[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
59/80: installer: Prevent the user specifying the same mount point twice
From: |
John Darrington |
Subject: |
59/80: installer: Prevent the user specifying the same mount point twice. |
Date: |
Tue, 3 Jan 2017 15:49:45 +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"
- 39/80: installer: New predicate valid-hostname?, (continued)
- 39/80: installer: New predicate valid-hostname?, John Darrington, 2017/01/03
- 48/80: installer: Enable scrolling in the installation window., John Darrington, 2017/01/03
- 46/80: installer: Add inetutils bin directory to PATH., John Darrington, 2017/01/03
- 33/80: installer: Write the configuration to a temporary file., John Darrington, 2017/01/03
- 61/80: installer: Change the order of the filesystem task conditions., John Darrington, 2017/01/03
- 43/80: gnu: Add guix to the path environment for the guix-installer service., John Darrington, 2017/01/03
- 45/80: installer: Replace an instance of cdr with match., John Darrington, 2017/01/03
- 32/80: installer: Add a task to actually call guix system init., John Darrington, 2017/01/03
- 38/80: installer: Replace some instances of "car"., John Darrington, 2017/01/03
- 26/80: installer: Add a new menu to configure wireless interfaces., John Darrington, 2017/01/03
- 59/80: installer: Prevent the user specifying the same mount point twice.,
John Darrington <=
- 57/80: installer: Issue message to user on failure of filesystems task., John Darrington, 2017/01/03
- 64/80: installer: Add a console-keymap service., John Darrington, 2017/01/03
- 71/80: installer: Make setting up of the network a prerequisite., John Darrington, 2017/01/03
- 55/80: installer: Close unused ports in pipe-cmd., John Darrington, 2017/01/03
- 72/80: installer: Ensure that all mount points are absolute paths., John Darrington, 2017/01/03
- 70/80: installer: Change essid --> wireless., John Darrington, 2017/01/03
- 52/80: installer: Fix bug where window-pipe did not return the proper exit status., John Darrington, 2017/01/03
- 78/80: installer: Rename "file-browser" -> "time-zone"., John Darrington, 2017/01/03
- 75/80: installer: Add predicate for the network task., John Darrington, 2017/01/03
- 50/80: installer: Rename module "new" to "guixsd-installer"., John Darrington, 2017/01/03