renumber our 9x-* xen-tools hooks to make some room
[invirt/packages/invirt-autoinstaller.git] / common / usr / lib / xen-tools / debian.d / 95-install-base-system
diff --git a/common/usr/lib/xen-tools/debian.d/95-install-base-system b/common/usr/lib/xen-tools/debian.d/95-install-base-system
new file mode 100755 (executable)
index 0000000..d6737ae
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+#  This script installs the sort of things you expect on an Ubuntu
+#  system
+#
+
+prefix=$1
+
+#
+#  Source the common functions
+#
+if [ -e /usr/lib/xen-tools/common.sh ]; then
+    . /usr/lib/xen-tools/common.sh
+else
+    . ./hooks/common.sh
+fi
+
+logMessage Script $0 starting
+
+installDebianPackage ${prefix} ubuntu-minimal
+installDebianPackage ${prefix} ubuntu-standard
+
+
+# For Debian, there is no metapackage, but we can pull in the
+# equivalent based on package priority.
+#
+# (On Ubuntu Hardy, this will additionally pull in libdns32, libisc32,
+# and nfs-common, which seems fairly benign.)
+
+installDebianPackage ${prefix} aptitude
+
+logMessage "Installing Debian standard system to prefix ${prefix}"
+echo -e '#!/bin/bash\nexit 101\n' > ${prefix}/usr/sbin/policy-rc.d
+chmod +x ${prefix}/usr/sbin/policy-rc.d
+chroot ${prefix} aptitude -y install '~prequired|~pimportant|~pstandard'
+rm -f {$prefix}/usr/sbin/policy-rc.d
+
+
+#
+# Log our finish
+#
+logMessage Script $0 finished