]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Check that there is netplan binary, rather than just just a config directory.
authorDimitri John Ledkov <xnox@ubuntu.com>
Thu, 31 Aug 2017 11:40:58 +0000 (12:40 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 4 Sep 2017 11:19:30 +0000 (13:19 +0200)
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
templates/lxc-ubuntu.in

index dff6836b4253a278856befd5cbb035218d0911eb..0e146dea3208b842d77239c4eedd422316c31633 100644 (file)
@@ -92,7 +92,7 @@ configure_ubuntu()
     password=$5
 
     # configure the network using the dhcp
-    if [ -d $rootfs/etc/netplan ]; then
+    if chroot $rootfs which netplan >/dev/null 2>&1; then
         cat <<EOF > $rootfs/etc/netplan/10-lxc.yaml
 network:
   ethernets: