renumber {36,96}-clear-root-password to go after install-base-system
[invirt/packages/invirt-autoinstaller.git] / common / usr / lib / xen-tools / debian.d / 96-clear-root-password
diff --git a/common/usr/lib/xen-tools/debian.d/96-clear-root-password b/common/usr/lib/xen-tools/debian.d/96-clear-root-password
new file mode 100755 (executable)
index 0000000..2812872
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+#  This script unsets the root password, so the VM owner can log in at
+#  the console.
+#
+#  Must come after 95-install-base-system, since that disables root's password.
+#
+
+prefix=$1
+
+if [ -e /usr/lib/xen-tools/common.sh ]; then
+    . /usr/lib/xen-tools/common.sh
+else
+    . ./hooks/common.sh
+fi
+
+logMessage Script $0 starting
+
+chroot ${prefix} passwd root -d
+
+logMessage Script $0 finished