core: Make lxc-template
optional [GH-254]
This commit is contained in:
parent
da96e8c1a4
commit
4f49be03ad
6 changed files with 19 additions and 4 deletions
|
@ -20,7 +20,9 @@ FEATURES:
|
|||
|
||||
IMPROVEMENTS:
|
||||
|
||||
- Set container utsname to configured hostname by default [[GH-253]]
|
||||
- `lxc-template` is now optional for base boxes and are bundled with the plugin,
|
||||
allowing us to roll out updates without the need to rebuild boxes [[GH-254]]
|
||||
- Set container's `utsname` to `config.vm.hostname` by default [[GH-253]]
|
||||
- Added libvirt dnsmasq leases file to the lookup paths [[GH-251]]
|
||||
- Improved compatibility with Vagrant 1.4 / 1.5 including the ability
|
||||
to use `rsync` and `nfs` shared folders to work around synced folders
|
||||
|
@ -29,6 +31,7 @@ IMPROVEMENTS:
|
|||
- Warn in case `:group` or `:owner` are specified for synced folders [[GH-251]]
|
||||
- Acceptance specs are now powered by `vagrant-spec` [[GH-213]]
|
||||
|
||||
[GH-254]: https://github.com/fgrehm/vagrant-lxc/issues/254
|
||||
[GH-196]: https://github.com/fgrehm/vagrant-lxc/issues/196
|
||||
[GH-251]: https://github.com/fgrehm/vagrant-lxc/pull/251
|
||||
[GH-253]: https://github.com/fgrehm/vagrant-lxc/pull/253
|
||||
|
|
|
@ -31,7 +31,7 @@ will be coming along _soon_.
|
|||
|
||||
## Requirements
|
||||
|
||||
* [Vagrant 1.1+](http://downloads.vagrantup.com/)
|
||||
* [Vagrant 1.1+](http://www.vagrantup.com/downloads.html)
|
||||
* lxc 0.7.5+
|
||||
* redir (if you are planning to use port forwarding)
|
||||
* A [kernel != 3.5.0-17.28](https://github.com/fgrehm/vagrant-lxc/wiki/Troubleshooting#wiki-im-unable-to-restart-containers)
|
||||
|
|
|
@ -23,7 +23,6 @@ popd &>>${LOG}
|
|||
|
||||
# Prepare package contents
|
||||
log 'Preparing box package contents'
|
||||
cp common/lxc-template ${WORKING_DIR}
|
||||
cp conf/${DISTRIBUTION} ${WORKING_DIR}/lxc-config
|
||||
cp conf/metadata.json ${WORKING_DIR}
|
||||
sed -i "s/<TODAY>/${NOW}/" ${WORKING_DIR}/metadata.json
|
||||
|
|
|
@ -1,2 +1,10 @@
|
|||
require "vagrant-lxc/version"
|
||||
require "vagrant-lxc/plugin"
|
||||
|
||||
module Vagrant
|
||||
module LXC
|
||||
def self.source_root
|
||||
@source_root ||= Pathname.new(File.dirname(__FILE__)).join('..').expand_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -42,7 +42,12 @@ module Vagrant
|
|||
end
|
||||
|
||||
def template_src
|
||||
@template_src ||= @box.directory.join('lxc-template').to_s
|
||||
@template_src ||=
|
||||
if (box_template = @box.directory.join('lxc-template')).exist?
|
||||
box_template.to_s
|
||||
else
|
||||
Vagrant::LXC.source_root.join('scripts/lxc-template').to_s
|
||||
end
|
||||
end
|
||||
|
||||
def template_config_file
|
||||
|
|
Loading…
Reference in a new issue