Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pushing jail hostname into jails

I tried the following jail.conf and everything works perfectly.

exec.start = "/bin/sh /etc/rc";
exec.poststart = "jail -m name=$name host.hostname=$name.`hostname`";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;
db {
  host.hostname = "db";
  path = "/usr/local/jails/db";
  interface = "lo1";
  ip4.addr = 127.0.1.2;
  mount.fstab = "/usr/local/jails/db.fstab";
}

ldap {
  host.hostname = "ldap";
  path = "/usr/local/jails/ldap";
  interface = "lo1";
  ip4.addr = 127.0.1.3;
  mount.fstab = "/usr/local/jails/ldap.fstab";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.