-
Notifications
You must be signed in to change notification settings - Fork 0
/
00-gentoo-prep.sh
executable file
·32 lines (25 loc) · 1.08 KB
/
00-gentoo-prep.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# Perform the initial preparation of the Gentoo box before installing any packages.
#
# Ensure the hostname has an entry in the host file to satisfy Apache when no other configuration exists.
echo "127.0.0.1" `hostname` >> /etc/hosts
#set timezone
#cp /usr/share/zoneinfo/Australia/Brisbane /etc/localtime
#echo "Australia/Brisbane" >> /etc/timezone
# Grab a fixed portage snapshot instead of emerge-webrsync so we can ensure these script will work tomorrow.
echo "Downloading portage snaphshot..."
PORTAGE_DATE=20160720
wget --tries=5 -nv http://dev.gentoo.org/~swift/snapshots/portage-${PORTAGE_DATE}.tar.bz2{,.gpgsig,.md5sum,.umd5sum}
mv /usr/portage /usr/portage.bak
echo "Extracting portage snapshot..."
tar xjpf portage-${PORTAGE_DATE}.tar.bz2 -C /usr
emerge $EM_VERBOSE --update portage
emerge $EM_VERBOSE --update --newuse --deep --with-bdeps=y --keep-going @world
revdep-rebuild
# Set locale
echo "en_GB.UTF-8 UTF-8" >> /etc/locale.gen
echo "en_AU.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
sed -i "s/en_US.utf8/en_GB.utf8/g" /etc/env.d/02locale
env-update && source /etc/profile