mardi 13 janvier 2015

How to enable systemd's service without waiting?


I'm trying to make fastest boot possible and did run systemd-analyze critical-chain:



graphical.target @5.800s
└─multi-user.target @5.800s
└─NetworkManager.service @4.201s +1.598s
└─basic.target @4.201s
└─sockets.target @4.196s
└─dbus.socket @4.196s
└─sysinit.target @4.196s
└─systemd-update-utmp.service @4.108s +87ms
└─systemd-tmpfiles-setup.service @4.066s +41ms
└─local-fs.target @4.066s
└─boot-efi.mount @3.964s +101ms
└─boot.mount @3.932s +26ms
└─systemd-fsck@dev-disk-by\x2duuid-9846843d\x2d8ec1\x2d4574\x2d8bcc\x2d4790440cad5f.service @3.714s +218ms
└─dev-disk-by\x2duuid-9846843d\x2d8ec1\x2d4574\x2d8bcc\x2d4790440cad5f.device @3.713s


As you can see └─NetworkManager.service @4.201s +1.598s adds +1.598s seconds to the boot time. However I don't need to have network running to type password and while I'm typing username/password on personal PC, network has enough time to connect.


So I tried: rm /etc/systemd/system/multi-user.target.wants/NetworkManager.service


However, that disabled NM completly at boot time and enabling it with systemctl enable NetworkManager is just creation of same symlink:



Created symlink from /etc/systemd/system/multi-user.target.wants/NetworkManager.service to /usr/lib/systemd/system/NetworkManager.service.


Is there any way to start NetworkManager.service during boot, but not as dependency of multi-user.target ??



Aucun commentaire:

Enregistrer un commentaire