INTERFACE=dummy0
# The netmask for the address
NETMASK=24
+HOSTS_VSERVER=dns
+# The hosts file to which an entry for the new vserver should be added. Can be
+# left empty to not record the new vserver anywhere.
+HOSTS_FILE=$VSERVERS_CONF/$HOSTS_VSERVER/vdir/etc/hosts
function usage()
{
# Commit the configuration
(cd /; git add $CONF_FOR_GIT)
(cd /; git commit $CONF_FOR_GIT --edit --message "vserver: Add $NAME vserver configuration.")
+
+if [ -n "$HOSTS_FILE" ]; then
+ sudo sh -c "echo '$IP $NAME' >> '$HOSTS_FILE'"
+fi