source: trunk/scripts/install-invirt/install-invirt.sh @ 3033

Last change on this file since 3033 was 3017, checked in by broder, 14 years ago

Pull in the invirt-system component in install-invirt.sh

We throw packages modified from upstream in there.

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/sh
2# Invirt install script.
3# Cribbed from install-debathena.sh.
4set -e
5
6output() {
7    printf '\033[38m'; echo "$@"; printf '\033[0m'
8}
9
10error() {
11    ret=`shift`
12    printf '\033[31m'; echo "$@"; printf '\033[0m'
13    exit $ret
14}
15
16if [ `id -u` != "0" ]; then
17    error 1 "You must run the Invirt installer as root."
18fi
19
20output "Installing the dependencies for the Invirt installer..."
21aptitude install lsb-release wget
22DISTRO=`lsb_release -cs`
23case $DISTRO in
24    hardy)
25        ;;
26    *)
27        error 1 'Invirt only supports Ubuntu hardy right now, sorry.'
28        ;;
29esac
30
31output "Adding repositories to the apt sources..."
32(
33    echo debathena http://debathena.mit.edu/apt $DISTRO debathena debathena-config openafs
34    echo invirt http://xvm.mit.edu/invirt stable main invirt-system
35) | while read name line; do
36    sourceslist="/etc/apt/sources.list.d/$name.list"
37    if [ -e $sourceslist ]; then
38        continue
39    fi
40    echo "deb     $line" >> "$sourceslist"
41    echo "deb-src $line" >> "$sourceslist"
42done
43
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
47# fi
48
49output "Downloading archive keys..."
50(
51  echo http://debathena.mit.edu/apt/debathena-archive.asc 503f95f71077c03947797932d3a1c424be0eced7
52  echo http://xvm.mit.edu/invirt/invirt-archive.asc a7ca522933fa3e4661b4ee6c18044e9740b1567c
53) | while read uri sha1; do
54  f=$(mktemp archive.asc.XXXX)
55  wget -O $f $uri
56  echo "$sha1  $f" | sha1sum -c
57  apt-key add $f
58  rm $f
59done
60
61aptitude update
62
63#output "Installing Invirt..."
64#DEBIAN_FRONTEND=noninteractive aptitude install invirt-host-master
65
66output "Invirt installation done!"
67output ""
68output "You probably want to ask invirt@mit.edu what to do next, if you're"
69output "not yourself one of the people who would answer that question."
70output "We're still working on documentation."
Note: See TracBrowser for help on using the repository browser.