From fa4663268c0a4d9b794c90a0b2c208a950be54bf Mon Sep 17 00:00:00 2001 From: Nigel McNie Date: Mon, 14 May 2007 22:38:17 +1200 Subject: [PATCH] Put the fqdn of the parent host in the hosts file. Copy the password from the host in a user-agnostic manner. --- profile/base/post-host | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/profile/base/post-host b/profile/base/post-host index 75aad17..bef1217 100644 --- a/profile/base/post-host +++ b/profile/base/post-host @@ -1,9 +1,9 @@ -# Copy martyn's password from the host -grep -v '^martyn' ${VSROOT}/etc/shadow > /vserver/.shadow -grep '^martyn' /etc/shadow >> /vserver/.shadow -mv /vserver/.shadow ${VSROOT}/etc/shadow - # Add a /etc/hosts entry on the HostOS cat /etc/hosts > /etc/hosts.new -echo "${VSIPADDR} ${VSNAME}" >> /etc/hosts.new +echo "${VSIPADDR} ${VSNAME}.$(hostname -f) ${VSNAME}" >> /etc/hosts.new mv /etc/hosts.new /etc/hosts + +# Copy the user's password from the host +grep -v "^${PROFILEOPTION_username}" ${VSROOT}/etc/shadow > /vserver/.shadow +grep "^${PROFILEOPTION_username}" /etc/shadow >> /vserver/.shadow +mv /vserver/.shadow ${VSROOT}/etc/shadow -- 2.39.5