I am trying to figure out how to get a script to figure out the hostname of the jail that is starting without having to manual set that as a command line parameter (as illustrated). It seems that the script is getting executed in a clean environment, regardless of the exec.clean setting. Is this a bug? The man pages aren't particularly clear on the expected behaviour of this. I am running FreeBSD 10.2.
I would like to be able to set exec.poststart as a global default so it doesn't need to be defined per jail. Thanks, -Markham ####################JAIL.CONF######################### exec.clean = 0 ; # HOW TO PASS THE JAILNAME TO THIS SCRIPT? exec.poststart += "/path/to/script.sh"; # My test jail testjail_example_com { # THIS WORKS exec.poststart += "/path/to/script.sh testjail.example.com"; exec.clean = 0 ; host.hostname = "testjail.example.com"; path = "/usr/jails/testjail.example.com"; ip4.addr += "net0|192.0.2.1/24"; exec.system_user = "root"; exec.jail_user = "root"; exec.start += "/bin/sh /etc/rc"; exec.stop = ""; exec.consolelog = "/var/log/jail_testjail_example_com_console.log"; mount.fstab = "/etc/testjail_example_com"; mount.devfs; devfs_ruleset = "5"; mount.fdescfs; mount.procfs; allow.mount; allow.set_hostname = 0; allow.sysvipc = 0; allow.raw_sockets=1; } _______________________________________________ freebsd-jail@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-jail To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"