6+ minute apt-daily.service boot delay

Tom H tomh0665 at gmail.com
Tue Nov 15 04:53:42 UTC 2016


On Tue, Nov 15, 2016 at 4:12 AM, NoOp <glgxg at sbcglobal.net> wrote:
> On 11/14/2016 2:03 PM, Tom H wrote:


>> Both the Debian bug above and the following one
>>
>> https://bugs.launchpad.net/ubuntu/+source/miredo/+bug/1482069
>>
>> advise to add:
>>
>> After=network-online.target
>> Wants=network-online.target
>>
>> to "miredo.service" (preferably as a drop-in in
>> "/etc/systemd/system/miredo.service.d/").
>
> Thanks Tom - works:
>
> $ /etc/init.d/miredo status
> ● miredo.service - Teredo IPv6 tunneling
>    Loaded: loaded (/lib/systemd/system/miredo.service; enabled; vendor
> preset: enabled)
>    Active: active (running) since Mon 2016-11-14 18:01:59 PST; 2min 46s ago
>   Process: 2112 ExecStartPre=/usr/sbin/miredo-checkconf -f
> /etc/miredo/miredo.conf (code=exited, status=0/SUCCESS)

You're welcome :)


> $ cat /lib/systemd/system/miredo.service
> [Unit]
> Description=Teredo IPv6 tunneling
> After=network-online.target
> Wants=network-online.target
>
> [Service]
> ExecStartPre=/usr/sbin/miredo-checkconf -f /etc/miredo/miredo.conf
> ExecStart=/usr/sbin/miredo -f
> ExecReload=/bin/kill -HUP $MAINPID
>
> [Install]
> WantedBy=multi-user.target

It's better to use a dropin:

# mkdir -p /etc/systemd/system/miredo.service.d
# echo "[Unit]" > /etc/systemd/system/miredo.service.d/network-online.conf
# echo "After=network-online.target" >>
/etc/systemd/system/miredo.service.d/network-online.conf
# echo "Wants=network-online.target" >>
/etc/systemd/system/miredo.service.d/network-online.conf
# systemctl daemon-reload

otherwise your changes to "/lib/systemd/system/miredo.service" will be
over-written by the next update to the package that owns it.




More information about the ubuntu-users mailing list