diff --git a/setup/pi/make-root-fs-readonly.sh b/setup/pi/make-root-fs-readonly.sh index 0ac59d93..218eeb6d 100644 --- a/setup/pi/make-root-fs-readonly.sh +++ b/setup/pi/make-root-fs-readonly.sh @@ -193,4 +193,13 @@ fi # newer than /run/systemd/systemd-units-load touch -t 197001010000 /etc/fstab +# autofs by default has dependencies on various network services, because +# one of its purposes is to automount NFS filesystems. +# TeslaUSB doesn't use NFS though, and removing those dependencies speeds +# up TeslaUSB startup. +if [ ! -e /etc/systemd/system/autofs.service ] +then + grep -v '^Wants=\|^After=' /lib/systemd/system/autofs.service > /etc/systemd/system/autofs.service +fi + log_progress "done"