From 2a5510b34cc59cd3cb8f2dcedc3073852d841101 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 24 Jul 2018 12:23:25 -0400 Subject: [PATCH] Fix "vargant package" for LXC 2.1+ config format New config format would be under `lxc.rootfs.path` and be prefixed by `dir:`. --- lib/vagrant-lxc/driver.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/vagrant-lxc/driver.rb b/lib/vagrant-lxc/driver.rb index 01d54fe8..bafed555 100644 --- a/lib/vagrant-lxc/driver.rb +++ b/lib/vagrant-lxc/driver.rb @@ -50,20 +50,20 @@ def config_path end def rootfs_path - config_entry = config_string.match(/^lxc\.rootfs\s+=\s+(.+)$/)[1] - case config_entry - when /^overlayfs:/ + pathtype, path = config_string.match(/^lxc\.rootfs(?:\.path)?\s+=\s+(.+:)?(.+)$/)[1..2] + case pathtype + when 'overlayfs:' # Split on colon (:), ignoring any colon escaped by an escape character ( \ ) # Pays attention to when the escape character is itself escaped. - fs_type, master_path, overlay_path = config_entry.split(/(?