Hello,
I constantly experienced slow booting > 50 secs when no network is available.
I solved this issue in many little ways, but the main breakthrough was that I changed the type of dietpi-boot.service.
/etc/systemd/system/dietpi-boot.service now contains :
[Service]
Type=forking
RemainAfterExit=yes
StandardOutput=tty
The “type=forking” is important, so it will not wait forever for the network, or if it will, it will do so in the background.
Previously, there was a “type=oneshot” there.
This improved system performance heavily :
root@DietPi:~# systemd-analyze blame
4.368s dietpi-boot.service
1.209s dietpi-preboot.service
574ms dev-mmcblk0p2.device
427ms systemd-logind.service
377ms systemd-udev-trigger.service
327ms keyboard-setup.service
278ms dietpi-ramdisk.service
225ms user@1000.service
220ms var-swap.swap
212ms networking.service
132ms dietpi-ramlog.service
128ms systemd-journald.service
92ms alsa-restore.service
90ms ssh.service
75ms systemd-udevd.service
Before this, the service needed more than 30 seconds without network.
Only caveat : If you plugin your network cable later, you will notice that the vsftpd has not started up. Never mind that.
So, my pro-tip to the developers : Speed up booting and change the type of your systemd service to “forking” !!!
Edit the file as described above. After editing it, do a “systemctl daemon-reload” and reboot.