Skip to content
Snippets Groups Projects
Commit 1c27641f authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

file-systems: Always write the options field in /etc/mtab.

* gnu/build/file-systems.scm (mount-file-system): When OPTIONS is false,
  write "rw" to /etc/mtab.  This fixes a bug whereby 'remove-from-mtab'
  in (guix syscalls) would otherwise raise a 'match-error' because of
  the missing field.  This affected file systems mounted from the
  initrd, such as devtmpfs, which has options == #f.
parent 8c3fc834
No related branches found
No related tags found
No related merge requests found
...@@ -293,7 +293,7 @@ (define* (mount-file-system spec #:key (root "/root")) ...@@ -293,7 +293,7 @@ (define* (mount-file-system spec #:key (root "/root"))
(mkdir-p (string-append root "/etc")) (mkdir-p (string-append root "/etc"))
(let ((port (open-file (string-append root "/etc/mtab") "a"))) (let ((port (open-file (string-append root "/etc/mtab") "a")))
(format port "~a ~a ~a ~a 0 0~%" (format port "~a ~a ~a ~a 0 0~%"
source mount-point type (or options "")) source mount-point type (or options "rw"))
(close-port port)))))) (close-port port))))))
;;; file-systems.scm ends here ;;; file-systems.scm ends here
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment