Browse Source

fix jails dependencies in jail conf template

master
Jörg Thalheim 6 years ago
parent
commit
4f1139376e
  1. 10
      jails.json
  2. 6
      scripts/lib/jail.rb

10
jails.json

@ -13,13 +13,17 @@
"flavor": "default",
"default_fstab": [
"/usr/jails/basejail /usr/jails/%{name}/basejail nullfs ro 0 0",
"/data/pkg /usr/jails/%{name} nullfs ro 0 0"
"/data/repo /usr/jails/%{name}/data/repo nullfs ro 0 0"
]
},
"default_jail_conf": {
"provide": "standard_ezjail",
"require": [],
"before": [],
"require": [
],
"before": [
],
"exec_start": "/bin/sh /etc/rc",
"exec_stop": null,
"hostname": "%{name}",

6
scripts/lib/jail.rb

@ -74,7 +74,11 @@ class JailRegistry < Registry
templ = Template.new(ROOT_PATH.join("templates/jail.erb"))
properties = jail_properties(jail.name, jail_data)
conf_path = EZJAIL_CONFIG_PATH.join(jail.name)
atomic_write(conf_path, templ.render(name: jail.name, properties: properties))
atomic_write(conf_path, templ.render(name: jail.name,
properties: properties,
provide: jail_data["provide"],
require_: jail_data["require"],
before: jail_data["before"]))
end
end

Loading…
Cancel
Save