diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index f8a34b021c7..e2d1734367d 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -321,13 +321,18 @@ EINVAL, ELOOP, etc." ;; convention to be followed. (source (canonicalize-path* (string-append etc "/" file)))) (rm-f target) - (if (string=? (basename target) "sudoers") - (begin - ;; /etc/sudoers must be a regular file. - (copy-file source target) - ;; XXX: dirty hack to meet sudo's expectations - (chmod target #o440)) - (symlink source target)))) ;usual case + (cond ((string=? (basename target) "sudoers") + (begin + ;; /etc/sudoers must be a regular file. + (copy-file source target) + ;; XXX: dirty hack to meet sudo's expectations + (chmod target #o440))) + ((string=? (basename target) "hosts") + ;; /etc/hosts must be a regular file, as some software + ;; like vpn-slice expect to be able to write to it. + (copy-file source target)) + (else ;usual case + (symlink source target))))) (scandir etc (negate dot-or-dot-dot?) ;; The default is 'string-locale