/etc/dhcp/dhcpd.conf
ddns-update-style interim;
local-address 172.28.252.20;
option domain-search "taribo.lan";
default-lease-time 6000;
max-lease-time 7200;
authoritative;
log-facility local7;
shared-network networks_ether0 {
subnet 172.28.252.0 netmask 255.255.255.0 {
range 172.28.252.101 172.28.252.150;
option domain-name-servers 172.28.252.20;
option routers 172.28.252.1;
next-server 172.28.252.20;
filename "pxelinux.0";
option root-path "172.28.252.20:/var/pxeroot";
}
}
group {
host node-1 { hardware ethernet 52:54:00:00:00:41; fixed-address 172.28.252.41;}
host node-2 { hardware ethernet 52:54:00:00:00:42; fixed-address 172.28.252.42;}
host node-3 { hardware ethernet 52:54:00:00:00:43; fixed-address 172.28.252.43;}
}
group {
next-server 172.28.252.20;
filename "ubuntu/pxelinux.0";
host ubu-1 { hardware ethernet 52:54:00:00:00:61; fixed-address 172.28.252.61;}
host ubu-2 { hardware ethernet 52:54:00:00:00:62; fixed-address 172.28.252.62;}
host ubu-3 { hardware ethernet 52:54:00:00:00:63; fixed-address 172.28.252.63;}
}
key "rndc-key" {
algorithm hmac-md5;
secret "1EBOXhNmlPSp5hZnVwcWqA==";
};
zone taribo.lan {
primary 172.28.252.20;
key rndc-key;
}
zone 252.168.192.in-addr.arpa. {
primary 172.28.252.20;
key rndc-key;
}
/var/pxeroot/usr/local/sbin/mkauto
#!/bin/bash
source /usr/local/lib/mksystem.lib
source /root/config.dat
echo $SYSTEM
test -z "$SYSTEM" && SYSTEM="ubuntu"
test -z "$HN" && HN="rumburak"
test -z "$IP" && IP="192.168.252.69"
NM="255.255.255.0"
GW="192.168.252.1"
DN="192.168.252.20"
SE="taribo.lan xinux.org"
PA="iptraf"
US="stunk"
PW="oimel"
GR="sudo"
RD="/mnt/new"
CR="chroot $RD"
part_format
echo $SYSTEM
case $SYSTEM in
ubuntu)
echo ubuntu
SY="ubuntu-14.04-v5.tgz"
UR="http://doom.xinux.org/images/$SY"
mount_build
ubuntu_netmodify
ubuntu_modify
;;
centos)
SY="centos-7-v2.tgz"
UR="http://doom.xinux.org/images/$SY"
mount_build
centos_netmodify
centos_modify
;;
arch)
SY="archlinux-bootstrap-2015.10.01-x86_64.tar.gz"
UR="http://doom.xinux.org/images/$SY"
mount_build
#centos_netmodify
#centos_modify
;;
esac
#unmount