~ubuntu-branches/debian/jessie/rinse/jessie

« back to all changes in this revision

Viewing changes to scripts/centos-5/post-install.sh

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kemp
  • Date: 2008-06-28 21:22:23 UTC
  • mfrom: (1.2.1 upstream) (3.1.1 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080628212223-mteb47q7aocea9uy
Tags: 1.3-2
* Removed several "bashisms" from our scripts
  - Thanks for Ubuntu for the patch / feedback.
  (Closes: #488356)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
  exit
11
11
fi
12
12
 
 
13
arch=i386
 
14
if [ $ARCH = "amd64" ] ; then
 
15
       arch=x86_64
 
16
fi
13
17
 
14
18
 
15
19
#
22
26
fi
23
27
cp /etc/resolv.conf "${prefix}/etc/"
24
28
 
25
 
 
26
 
#
27
 
#  2.  Setup yum.conf
28
 
#
29
 
arch=i386
30
 
if [ $ARCH == "amd64" ] ; then
31
 
    arch=x86_64;
32
 
fi
33
 
 
34
 
cat >>${prefix}/etc/yum.conf <<EOF
35
 
[base]
36
 
name=CentOS-5 - Base
37
 
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$arch&repo=os
38
 
baseurl=http://mirror.centos.org/centos/5/os/$arch/
39
 
gpgcheck=0
40
 
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
41
 
priority=1
42
 
protect=1
43
 
 
44
 
#released updates 
45
 
[updates]
46
 
name=CentOS-5 - Updates
47
 
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$arch&repo=updates
48
 
baseurl=http://mirror.centos.org/centos/5/updates/$arch/
49
 
gpgcheck=0
50
 
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
51
 
priority=1
52
 
protect=1
53
 
 
54
 
#packages used/produced in the build but not released
55
 
[addons]
56
 
name=CentOS-5 - Addons
57
 
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$arch&repo=addons
58
 
baseurl=http://mirror.centos.org/centos/5/addons/$arch/
59
 
gpgcheck=0
60
 
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
61
 
priority=1
62
 
protect=1
63
 
 
64
 
#additional packages that may be useful
65
 
[extras]
66
 
name=CentOS-5 - Extras
67
 
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$arch&repo=extras
68
 
baseurl=http://mirror.centos.org/centos/5/extras/$arch/
69
 
gpgcheck=0
70
 
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
71
 
priority=1
72
 
protect=1
73
 
 
74
 
#additional packages that extend functionality of existing packages
75
 
[centosplus]
76
 
name=CentOS-5 - Plus
77
 
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$arch&repo=centosplus
78
 
baseurl=http://mirror.centos.org/centos/5/centosplus/$arch/
79
 
gpgcheck=0
80
 
enabled=0
81
 
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
82
 
priority=2
83
 
protect=1
84
 
 
85
 
#contrib - packages by Centos Users
86
 
[contrib]
87
 
name=CentOS-5 - Contrib
88
 
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$arch&repo=contrib
89
 
baseurl=http://mirror.centos.org/centos/5/contrib/$arch/
90
 
gpgcheck=0
91
 
enabled=0
92
 
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
93
 
priority=2
94
 
protect=1
95
 
 
96
 
EOF
97
 
 
98
 
 
99
29
#
100
30
#  3.5 BUGFIX:
101
31
echo "BUGFIX"
104
34
    mv $i ${prefix}/usr/lib/python2.4/site-packages/urlgrabber.skx/
105
35
done
106
36
 
 
37
# 3.6 BUGFIX: yumrepo
 
38
echo "BUGFIX: yumrepo"
 
39
chroot ${prefix} sed -i s/\$releasever/5/g /etc/yum.repos.d/CentOS-Base.repo
 
40
chroot ${prefix} sed -i s/\$basearch/$arch/g /etc/yum.repos.d/CentOS-Base.repo
107
41
#
108
42
#
109
43
#  4.  Run "yum install yum".
115
49
mount -o bind /proc ${prefix}/proc
116
50
 
117
51
echo "  Bootstrapping yum"
118
 
chroot ${prefix} /usr/bin/yum -y install yum passwd 2>/dev/null
 
52
chroot ${prefix} /usr/bin/yum -y install yum         2>/dev/null
 
53
chroot ${prefix} /usr/bin/yum -y install vim-minimal 2>/dev/null
 
54
chroot ${prefix} /usr/bin/yum -y install dhclient    2>/dev/null
119
55
 
120
56
#
121
57
#  4.5 make 'passwd' work.
127
63
#
128
64
#  5.  Clean up
129
65
#
130
 
echo "  Cleaing up"
 
66
echo "  Cleaning up"
131
67
chroot ${prefix} /usr/bin/yum clean all
132
68
umount ${prefix}/proc
133
69
 
136
72
#  6.  Remove the .rpm files from the prefix root.
137
73
#
138
74
echo "  Final tidy..."
139
 
for i in ${prefix}/*.rpm; do 
 
75
for i in ${prefix}/*.rpm; do
140
76
    rm -f $i
141
77
done
142
78
find ${prefix} -name '*.rpmorig' -delete