[Merge] ~chad.smith/livecd-rootfs:cloud-init-network-nm-override into livecd-rootfs:ubuntu/master

Dan Bungert mp+473594 at code.launchpad.net
Fri Sep 20 18:04:00 UTC 2024


> Why do we duplicate the entire service with edits here

This was looked at previously, but there have been problems with doing the requisite edits on the Before/After values with drop-ins.



Diff comments:

> diff --git a/live-build/functions b/live-build/functions
> index 912804a..9ec5196 100644
> --- a/live-build/functions
> +++ b/live-build/functions
> @@ -1086,7 +1088,14 @@ ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
>  
>  [Service]
>  Type=oneshot
> -ExecStart=/usr/bin/cloud-init init
> +# This service is a shim which preserves systemd ordering while allowing a
> +# single Python process to run cloud-init's logic. This works by communicating
> +# with the cloud-init process over a unix socket to tell the process that this
> +# stage can start, and then wait on a return socket until the cloud-init
> +# process has completed this stage. The output from the return socket is piped
> +# into a shell so that the process can send a completion message (defaults to
> +# "done", otherwise includes an error message) and an exit code to systemd.
> +ExecStart=sh -c 'echo "start" | netcat -Uu -W1 /run/cloud-init/share/network.sock -s /run/cloud-init/share/network-return.sock | sh'

I note that the copy on my system is using nc.openbsd instead of netcat, is that difference relevant?

>  RemainAfterExit=yes
>  TimeoutSec=0
>  


-- 
https://code.launchpad.net/~chad.smith/livecd-rootfs/+git/livecd-rootfs/+merge/473594
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list