chaotic-aur / toolbox

Unified kit with all the scripts required for maintaining the repository 🧰
https://aur.chaotic.cx
GNU Affero General Public License v3.0
81 stars 11 forks source link

Add network-online.target dependency to services. #38

Closed Edu4rdSHL closed 2 years ago

Edu4rdSHL commented 2 years ago

It makes sense to add network-online.target as a dependency of the services since that they requires the network to be up. It helps a lot to solve problems like the following on machines that are constantly rebooted/hibernated like desktop computers/laptops:

Logs are in reverse order

Apr 25 23:08:02 CatBuilder systemd[1]: chaotic-tkg-kernels.service: Failed with result 'exit-code'.
Apr 25 23:08:02 CatBuilder systemd[1]: chaotic-tkg-kernels.service: Main process exited, code=exited, status=128/n/a
Apr 25 23:08:02 CatBuilder chaotic[58]: fatal: unable to access 'https://github.com/Frogging-Family/linux-tkg.git/': Could not resolve host: github.com
Apr 25 23:08:02 CatBuilder chaotic[56]: Cloning into 'linux-tkg'...
Apr 25 23:08:02 CatBuilder chaotic[55]: rm: cannot remove './*.lock': No such file or directory
Apr 25 23:08:02 CatBuilder chaotic[28]: Cleaning pre-existent routine directory.
Apr 25 23:08:02 CatBuilder chaotic[48]: HEAD is now at 79e3184 Update PKGREL_BUMPS
Apr 25 23:08:02 CatBuilder chaotic[46]: fatal: unable to access 'https://github.com/chaotic-aur/interfere.git/': Could not resolve host: github.com
Apr 25 23:08:02 CatBuilder chaotic[28]: Syncing interfere...
Apr 25 23:08:02 CatBuilder chaotic[28]: Skipping config file that was not found
Apr 25 23:08:02 CatBuilder chaotic[37]: No duplicate packages were found!
Apr 25 23:08:02 CatBuilder systemd[1]: Started Chaotic+TkG's kernels routine.

As a note, for it to really work, the user needs to enable systemd-networkd-wait-online.service if using systemd-networkd or NetworkManager-wait-online.service if using NetworkManager.

Signed-off-by: Eduard Tolosa edu4rdshl@protonmail.com

dr460nf1r3 commented 2 years ago

Seems like a useful and needed change :)