From 681c490cdcefe0109597e4dd27dba499867cac50 Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sun, 21 Jul 2013 22:46:42 -0300 Subject: [PATCH] Add Vagrantfile VM name to the container name Closes #115 --- lib/vagrant-lxc/action/create.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-lxc/action/create.rb b/lib/vagrant-lxc/action/create.rb index 4a5f089..edc4ef5 100644 --- a/lib/vagrant-lxc/action/create.rb +++ b/lib/vagrant-lxc/action/create.rb @@ -7,7 +7,7 @@ module Vagrant end def call(env) - container_name = env[:root_path].basename.to_s + container_name = "#{env[:root_path].basename.to_s}_#{env[:machine].name}" container_name.gsub!(/[^-a-z0-9_]/i, "") container_name << "-#{Time.now.to_i}"