2 # Invirt install script.
3 # Cribbed from install-debathena.sh.
7 printf '\033[38m'; echo "$@"; printf '\033[0m'
12 printf '\033[31m'; echo "$@"; printf '\033[0m'
16 if [ `id -u` != "0" ]; then
17 error 1 "You must run the Invirt installer as root."
20 output "Installing the dependencies for the Invirt installer..."
21 aptitude install lsb-release wget
22 DISTRO=`lsb_release -cs`
27 error 1 'Invirt only supports Ubuntu hardy right now, sorry.'
31 output "Adding repositories to the apt sources..."
33 echo debathena http://debathena.mit.edu/apt $DISTRO debathena debathena-config openafs
34 echo invirt http://xvm.mit.edu/invirt stable main
35 ) | while read name line; do
36 sourceslist="/etc/apt/sources.list.d/$name.list"
37 if [ -e $sourceslist ]; then
40 echo "deb $line" >> "$sourceslist"
41 echo "deb-src $line" >> "$sourceslist"
44 # if [ "$UBUNTU" = "yes" ]; then
45 # output "Making sure the universe repository is enabled"
46 # sed -i 's,^# \(deb\(\-src\)* http://archive.ubuntu.com/ubuntu [[:alnum:]]* universe\)$,\1,' /etc/apt/sources.list
49 output "Downloading archive keys..."
51 echo http://debathena.mit.edu/apt/debathena-archive.asc a96663dcee0f303afcadca3105eae6bf7c7e698a
52 echo http://xvm.mit.edu/invirt/invirt-archive.asc fc5d50e7507a871b45dde55a77448edb0e22c184
53 ) | while read uri sha1; do
54 f=$(mktemp archive.asc.XXXX)
56 echo "$sha1 $f" | sha1sum -c
63 #output "Installing Invirt..."
64 #DEBIAN_FRONTEND=noninteractive aptitude install invirt-host-master
66 output "Invirt installation done!"
68 output "You probably want to ask invirt@mit.edu what to do next, if you're"
69 output "not yourself one of the people who would answer that question."
70 output "We're still working on documentation."