]> git.sommitrealweird.co.uk Git - lxc-debian-unprivileged.git/blobdiff - templates/lxc-debian-unprivileged
Set the hostname to the name of the container
[lxc-debian-unprivileged.git] / templates / lxc-debian-unprivileged
index bc6288b8eb69f9a14f24d9e998ca239448e007dd..33116094095730ce833184ab5e0aecf443853e68 100755 (executable)
@@ -191,6 +191,9 @@ fi
 # remove some interesting breakages in pam for unpriv foo
 sed -i -e 's#^\(session.*required.*pam_loginuid.so\)#\#\1#;' ${LXC_ROOTFS}/etc/pam.d/*
 
 # remove some interesting breakages in pam for unpriv foo
 sed -i -e 's#^\(session.*required.*pam_loginuid.so\)#\#\1#;' ${LXC_ROOTFS}/etc/pam.d/*
 
+# set the hostname
+echo $LXC_NAME > ${LXC_ROOTFS}/etc/hostname
+
 # setup sources.list
 cat <<EOF > ${LXC_ROOTFS}/etc/apt/sources.list
 deb $DEBIAN_MIRROR $DEBIAN_RELEASE main
 # setup sources.list
 cat <<EOF > ${LXC_ROOTFS}/etc/apt/sources.list
 deb $DEBIAN_MIRROR $DEBIAN_RELEASE main