set hostname in sandbox to profile name

networking
brl 9 years ago
parent f3825e2d06
commit 67153a9a28

@ -111,6 +111,11 @@ func parseArgs() *initState {
func (st *initState) runInit() {
st.log.Info("Starting oz-init for profile: %s", st.profile.Name)
st.log.Info("Socket address: %s", st.address)
if syscall.Sethostname([]byte(st.profile.Name)) != nil {
st.log.Error("Failed to set hostname to (%s)", st.profile.Name)
}
st.log.Info("Hostname set to (%s)", st.profile.Name)
if err := st.fs.OzInit(); err != nil {
st.log.Error("Error: setting up filesystem failed: %v\n", err)
os.Exit(1)

Loading…
Cancel
Save