[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble with nfs mount

From: Fredrik Salomonsson
Subject: Re: Trouble with nfs mount
Date: Sun, 23 Oct 2022 20:39:28 +0000

Hi Remco,

Remco <> writes:

> Autofs works pretty well for me. Using the stock package and a service like 
> described here:

Thanks for pointing out Autofs. I did not know about it before and
indeed it works quite well for this. I based mine of what described in
the link, here's what I ended up with:

(define (automount-shepherd-service config)
  (list (shepherd-service
         (provision '(automount))
         (documentation "Run the automount server.")
         (requirement '(networking))
         (start #~(make-forkexec-constructor
                   (list #$(file-append autofs "/sbin/automount") "-f")
                   #:log-file "/var/log/automount.log"))
         (stop #~(make-kill-destructor)))))

(define automount-service-type
   (name 'automount)
   (description "Run the automount server.")
    (list (service-extension shepherd-root-service-type
          (service-extension rottlog-service-type
                              (list (log-rotation
                                     (files (list "/var/log/automount.log"))))))
          (service-extension etc-service-type
                        (lambda (config)
                          `(("autofs.conf" ,(plain-file "autofs.conf" ""))
                            ("auto.master" ,(plain-file "auto.master" "\
/media  /etc/autofs/auto.valhalla  --timeout 60
                            ("autofs/auto.valhalla" ,(plain-file 
"auto.valhalla" "\
Valhalla  -rw,soft  fafner:/srv/nfs4/Valhalla
   (default-value '())))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]