initial scripts
This commit is contained in:
parent
4ce24e20ca
commit
c3eb141b88
@ -0,0 +1,7 @@
|
|||||||
|
xinetd
|
||||||
|
services
|
||||||
|
control
|
||||||
|
auth
|
||||||
|
ahttpd-server
|
||||||
|
vsftpd
|
||||||
|
net-dnat
|
@ -0,0 +1,27 @@
|
|||||||
|
net-domain
|
||||||
|
trust
|
||||||
|
ca
|
||||||
|
datetime
|
||||||
|
logs
|
||||||
|
quota
|
||||||
|
bacula-backup
|
||||||
|
mkve
|
||||||
|
xinted
|
||||||
|
services
|
||||||
|
updates
|
||||||
|
control
|
||||||
|
ahttpd-server
|
||||||
|
ahttpd-poweroff
|
||||||
|
|
||||||
|
dhcp
|
||||||
|
mirror
|
||||||
|
netinst
|
||||||
|
vsftpd
|
||||||
|
|
||||||
|
root
|
||||||
|
|
||||||
|
net-eth
|
||||||
|
net-pptp
|
||||||
|
net-pppoe
|
||||||
|
net-iptables
|
||||||
|
net-dnat
|
@ -0,0 +1,5 @@
|
|||||||
|
system
|
||||||
|
pkg
|
||||||
|
servers
|
||||||
|
users
|
||||||
|
network
|
80
installer-distro-altlinux-server/initinstall.d/05-vm-profile
Executable file
80
installer-distro-altlinux-server/initinstall.d/05-vm-profile
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# see also http://www.altlinux.org/Autoinstall
|
||||||
|
|
||||||
|
message() { echo "vm-profile: $*" >>/tmp/vm-profile.log; }
|
||||||
|
|
||||||
|
mem="$(sed -n '/^MemTotal/s/[^0-9]//gp' /proc/meminfo)" # in kB
|
||||||
|
max_disk="$(sort -rn /sys/block/[hs]d*/size | head -1)" # in 512-byte sectors
|
||||||
|
|
||||||
|
# feel free to suggest better defaults
|
||||||
|
if [ "$mem" -le 262144 ]; then
|
||||||
|
swap="$[ 2*$mem ]"
|
||||||
|
elif [ "$mem" -le 524288 ]; then
|
||||||
|
swap="$mem"
|
||||||
|
else
|
||||||
|
swap=1048576
|
||||||
|
fi
|
||||||
|
|
||||||
|
# don't do RAID in a VM, reduce swap to a minimum
|
||||||
|
if grep -qE '(101300b8)|(80eebeef)|(14ad0405)' /proc/bus/pci/devices; then
|
||||||
|
methods='plain'
|
||||||
|
swap=131072
|
||||||
|
else
|
||||||
|
methods='raid plain'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# less than 10G, choose 1G partitions
|
||||||
|
if [ "$max_disk" -le 20971520 ]; then
|
||||||
|
base=1048576
|
||||||
|
elif [ "$max_disk" -le 52428800 ]; then
|
||||||
|
base=2097152
|
||||||
|
else
|
||||||
|
base=10485760
|
||||||
|
fi
|
||||||
|
|
||||||
|
message "mem=$mem k"
|
||||||
|
message "swap=$swap k"
|
||||||
|
message "max_disk=$max_disk"
|
||||||
|
message "base=$base k"
|
||||||
|
|
||||||
|
# EVMS deals with sectors
|
||||||
|
swap="$[ 2*$swap ]"
|
||||||
|
base="$[ 2*$base ]"
|
||||||
|
|
||||||
|
# The Plan:
|
||||||
|
# - provide a few more or less equivalent server partitioning profiles
|
||||||
|
# - give larger swap to build servers (RAM sized so tmpfs can get swapped out)
|
||||||
|
|
||||||
|
cat > /var/cache/alterator/vm-profile.scm << _EOF_
|
||||||
|
((var
|
||||||
|
(title . "Server (/var holds most space)")
|
||||||
|
(action . trivial)
|
||||||
|
(actiondata
|
||||||
|
("swap" (size . $swap) (fsim . "SWAPFS") (methods $methods))
|
||||||
|
("/" (size $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/var" (size $base . #t) (fsim . "Ext2/3") (methods $methods))))
|
||||||
|
(srv
|
||||||
|
(title . "Server (/srv holds most space)")
|
||||||
|
(action . trivial)
|
||||||
|
(actiondata
|
||||||
|
("swap" (size . $swap) (fsim . "SWAPFS") (methods $methods))
|
||||||
|
("/" (size $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/var" (size $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/srv" (size $base . #t) (fsim . "Ext2/3") (methods $methods))))
|
||||||
|
(home
|
||||||
|
(title . "Server (/home holds most space)")
|
||||||
|
(action . trivial)
|
||||||
|
(actiondata
|
||||||
|
("swap" (size . $swap) (fsim . "SWAPFS") (methods $methods))
|
||||||
|
("/" (size $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/var" (size $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/home" (size $base . #t) (fsim . "Ext2/3") (methods $methods))))
|
||||||
|
(build
|
||||||
|
(title . "Build server (larger swap for tmpfs)")
|
||||||
|
(action . trivial)
|
||||||
|
(actiondata
|
||||||
|
("swap" (size $[2*$mem]) (fsim . "SWAPFS") (methods $methods))
|
||||||
|
("/" (size $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/var" (size . $base) (fsim . "Ext2/3") (methods $methods))
|
||||||
|
("/home" (size $base . #t) (fsim . "Ext2/3") (methods $methods)))))
|
||||||
|
_EOF_
|
12
installer-distro-altlinux-server/installer-steps
Normal file
12
installer-distro-altlinux-server/installer-steps
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
sysconfig
|
||||||
|
license
|
||||||
|
datetime
|
||||||
|
vm
|
||||||
|
pkg
|
||||||
|
installer-preinstall
|
||||||
|
grub
|
||||||
|
installer-network
|
||||||
|
users-root
|
||||||
|
user-add
|
||||||
|
luks
|
||||||
|
release-notes
|
Loading…
Reference in New Issue
Block a user