]> git.mjollnir.org Git - vserverctl.git/commitdiff
Put the fqdn of the parent host in the hosts file. Copy the password from the host...
authorNigel McNie <nigel@catalyst.net.nz>
Mon, 14 May 2007 10:38:17 +0000 (22:38 +1200)
committerNigel McNie <nigel@freud.wgtn.cat-it.co.nz>
Mon, 14 May 2007 10:38:17 +0000 (22:38 +1200)
profile/base/post-host

index 75aad173f11c11860e4e15d876f2a729f1510a35..bef1217aac4c542d330784379d8afb84554485ca 100644 (file)
@@ -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