diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/base.scm | 22 | ||||
-rw-r--r-- | gnu/services/networking.scm | 3 |
2 files changed, 21 insertions, 4 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2b3d3f8548..ea1ab63d1b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -269,10 +269,24 @@ FILE-SYSTEM." #$(if create? #~(mkdir-p #$target) #t) - (mount-file-system - `(#$device #$title #$target #$type #$flags #$options - #$check?) #:root "/") - #t)) + + (let (($PATH (getenv "PATH"))) + ;; Make sure fsck.ext2 & co. can be found. + (dynamic-wind + (lambda () + (setenv "PATH" + (string-append + #$e2fsprogs "/sbin:" + "/run/current-system/profile/sbin:" + $PATH))) + (lambda () + (mount-file-system + `(#$device #$title #$target #$type #$flags + #$options #$check?) + #:root "/")) + (lambda () + (setenv "PATH" $PATH))) + #t))) (stop #~(lambda args ;; Normally there are no processes left at this point, so ;; TARGET can be safely unmounted. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index bbb9053008..d672ecf687 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -467,6 +467,9 @@ HiddenServicePort ~a ~a~%" (chown "/var/lib/tor" (passwd:uid %user) (passwd:gid %user)) (chmod "/var/lib/tor" #o700) + ;; Make sure /var/lib is accessible to the 'tor' user. + (chmod "/var/lib" #o755) + (for-each initialize '#$(map hidden-service-name (tor-configuration-hidden-services config))))) |