-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
70 lines (54 loc) · 911 Bytes
/
install.sh
File metadata and controls
70 lines (54 loc) · 911 Bytes
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh -e
vrouter_addons()
{
apk add quagga
rc-update add keepalived boot
}
vm_tools()
{
apk add rsync
apk add udev
apk add iptables
apk add open-vm-tools
apk add sfdisk
apk add e2fsprogs-extra
apk add util-linux
}
vm_services()
{
rc-update add udev boot
rc-update add iptables boot
rc-update add open-vm-tools boot
rc-update add acpid boot
rc-update add one-context boot
}
deploy_files()
{
rsync -ar etc /
rsync -ar usr /
}
vrouter_or_not()
{
# if VROUTER is set to no the ONE virtual router parts are skipped.
if [ "x${VROUTER}" = "xno" ]; then
# delete vrouter files
rm /etc/one-context.d/02-keepalived /etc/sysctl.d/01-one.conf
else
vrouter_addons
fi
}
cleanup()
{
echo '' > /etc/resolv.conf
apk cache clean
}
main()
{
# start, just fetch fresh info
apk update
vm_tools
deploy_files
vm_services
vrouter_or_not
}
main