fix jails dependencies in jail conf template
This commit is contained in:
parent
9aa727fe91
commit
4f1139376e
10
jails.json
10
jails.json
|
@ -13,13 +13,17 @@
|
||||||
"flavor": "default",
|
"flavor": "default",
|
||||||
"default_fstab": [
|
"default_fstab": [
|
||||||
"/usr/jails/basejail /usr/jails/%{name}/basejail nullfs ro 0 0",
|
"/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": {
|
"default_jail_conf": {
|
||||||
"provide": "standard_ezjail",
|
"provide": "standard_ezjail",
|
||||||
"require": [],
|
"require": [
|
||||||
"before": [],
|
|
||||||
|
],
|
||||||
|
"before": [
|
||||||
|
|
||||||
|
],
|
||||||
"exec_start": "/bin/sh /etc/rc",
|
"exec_start": "/bin/sh /etc/rc",
|
||||||
"exec_stop": null,
|
"exec_stop": null,
|
||||||
"hostname": "%{name}",
|
"hostname": "%{name}",
|
||||||
|
|
|
@ -74,7 +74,11 @@ class JailRegistry < Registry
|
||||||
templ = Template.new(ROOT_PATH.join("templates/jail.erb"))
|
templ = Template.new(ROOT_PATH.join("templates/jail.erb"))
|
||||||
properties = jail_properties(jail.name, jail_data)
|
properties = jail_properties(jail.name, jail_data)
|
||||||
conf_path = EZJAIL_CONFIG_PATH.join(jail.name)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue