Täiendav skript proxmoxi paigalduseks

Allikas: Kuutõrvaja
Redaktsioon seisuga 1. oktoober 2014, kell 13:03 kasutajalt Jj (arutelu | kaastöö) (Uus lehekülg: ' Preseed faili lõppu d-i preseed/late_command string \ in-target wget http://preseed.cs.uchicago.edu/host/proxmox-test/post.sh; \ in-target bash post.sh; \ in-target rm post.s...')
(erin) ←Vanem redaktsioon | Viimane redaktsiooni (erin) | Uuem redaktsioon→ (erin)

Preseed faili lõppu

d-i preseed/late_command string \
in-target wget http://preseed.cs.uchicago.edu/host/proxmox-test/post.sh; \
in-target bash post.sh; \
in-target rm post.sh;

post.sh skript ise

#!/bin/bash

main(){
	etc-hosts-fix
	sources
	aptitude
	pve-kernel
}

etc-hosts-fix(){
cat > /etc/hosts <<EOF
127.0.0.1       localhost
EOF
}

sources(){
	cp /etc/apt/sources.list /etc/apt/sources.list.old
	cat > /etc/apt/sources.list <<EOF
deb http://ftp.us.debian.org/debian squeeze main contrib
# PVE packages provided by proxmox.com
deb http://download.proxmox.com/debian squeeze pve
# security updates
deb http://security.debian.org/ squeeze/updates main contrib
EOF
	# add proxmox ve repo key
	wget -O- "http://download.proxmox.com/debian/key.asc" | apt-key add -
}

aptitude(){
	aptitude update
	aptitude full-upgrade -y
	apt-get --purge remove exim4 -y
}

pve-kernel(){
	aptitude install -y pve-firmware
	aptitude install -y pve-kernel-2.6.32-16-pve
}

pve-main(){
	aptitude install -y proxmox-ve-2.6.32
	aptitude install -y ntp ssh lvm2 ksm-control-daemon
#	aptitude install -y postfix
}

main