forked from kmARC/upstream-institute-virtual-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-base.sh
executable file
·34 lines (25 loc) · 869 Bytes
/
install-base.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
33
34
#!/usr/bin/env bash
# TODO: select local server for updates
APT_MIRROR=http://mirror.switch.ch/ftp/mirror
export DEBIAN_FRONTEND=noninteractive
REPO=$(dirname "$(readlink -f "$0")")/
# Copy configs
sudo cp -r "$REPO/files/etc" /
sudo cp -r "$REPO/files/home" /
sudo chown -R "$USER:$GROUP" /home/
# Copy scripts
sudo cp -r "$REPO/files/usr" /
# Update and upgrade
sudo sed -i "s@http://archive.ubuntu.com@$APT_MIRROR@g" /etc/apt/sources.list
sudo apt update
sudo apt dist-upgrade -y
# Install git workflow related software
sudo apt install -y git gitk git-gui git-review tig
# Install basic TUI applications
sudo apt install -y htop mc tmux
# Set password
echo "$USER:openstack" | sudo chpasswd
# Disable Console serial port redirection
sudo sed -i "s/console=ttyS0//g" /etc/default/grub
sudo sed -i "s/console=ttyS0//g" /etc/default/grub.d/*
sudo update-grub