guix system: Check whether we are installing to /.

* guix/scripts/system.scm (install): Check whether TARGET is / and warn.
This commit is contained in:
Ludovic Courtès 2014-05-19 22:47:27 +02:00
parent c56d19fb11
commit 79b0d4e104

View File

@ -98,9 +98,11 @@ When GRUB? is true, install GRUB on DEVICE, using GRUB.CFG."
string=?)))
(topologically-sorted store lst)))
;; Copy items to the new store.
(for-each (cut copy-closure store <> target #:log-port log-port)
to-copy)
(if (string=? target "/")
(warning (_ "initializing the current root file system~%"))
;; Copy items to the new store.
(for-each (cut copy-closure store <> target #:log-port log-port)
to-copy))
;; Create a bunch of additional files.
(format log-port "populating '~a'...~%" target)