[WBEL-users] easy soho server-configuration

Andy Rabagliati andyr@wizzy.com
Sun, 20 Jun 2004 22:39:19 +0200


On Sun, 20 Jun 2004, Rainer Hamann wrote:

> I've developed an application for an easy server configuration for RedHat 8.2. 
> The application copies preconfigured configuration files to the server and 
> replaces values like $HOSTNAME$, $IP$ and so on by the actual values of the 
> server. Configured services are dhcp, nis, bind, nfs, samba and kickstart 
> files.
> 
> The program is written in lazarus/free pascal.
> 
> I've just found Whitebox linux on distrowatch.com and downloaded, installed it 
> and decided to use it for our networks in my school. We have about 80 
> workstations and 2 servers and have to make a new installation, because the 
> harddisk of our main server has become to small.
> 
> I'll test the next days, if my tool is running on Whitebox linux, and I would 
> like to make it part of Whitebox linux, if you are interested in it.
> 
> Rainer Hamann

I have a kickstart pre-install script that runs, and edits itself.

kickstart is gracious enough to re-read the file after pre-install, so it
works just dandy.

I am also working with whitebox - refreshing to have something that does not
need to be upgraded all the time.

However, whitebox cannot accept contributions - its role is to be a mirror
of redhat enterprise.

Cheers,  Andy!
### first part of kickstart file
install
text
lang en_US
network --bootproto static --ip _WIZZY_NETWORK_._WIZZY_LASTOCTET_ --netmask 255.255.255.0 --hostname _WIZZY_HOSTNAME_.wizzy.org.za --nameserver 127.0.0.1
cdrom
# device ethernet via-rhine
langsupport --default en_US en_US.UTF-8
keyboard us

zerombr yes
clearpart --all
part swap --size 512 --ondisk hda
part /boot --fstype ext3 --size 75 --ondisk hda
part / --fstype ext3 --size 1500 --ondisk hda
#part /var --fstype reiserfs --size 1500 --grow
part /var --fstype ext3 --size 1500 --grow

mouse none
timezone --utc Africa/Johannesburg
rootpw --iscrypted $1$iEdunQc3$tRza2nNqXKviWUdG19ry81
auth --useshadow --enableldap --ldapserver=localhost --ldapbasedn='ou=mailboxes,dc=_WIZZY_HOSTNAME_,dc=wizzy,dc=org,dc=za'
bootloader --location=mbr --useLilo
firewall --disabled

%packages
@ Wizzy Digital Courier

%pre
# this section has been broken in the version saved in /root ..
chvt 3
exec < /dev/tty3 > /dev/tty3
echo Type return ..
read
clear
echo Wizzy Digital Courier - enter configuration values. Enter gives default.
echo The first one - hostname - is important. Others can be changed later.
echo
read -p 'Your hostname: [myschool] ' WIZZY_HOSTNAME
read -p 'PPP dialup number: [0860007429] ' WIZZY_PPPNUMBER
read -p 'PPP username: [saixuser] ' WIZZY_PPPUSERNAME
read -p 'PPP password: [secret] ' WIZZY_PPPPASSWORD
read -p 'School District [KZN] ' WIZZY_SCHOOLDISTRICT
read -p 'Street address in quotes [ "Main St." ] ' WIZZY_STREET
read -p 'Wizzy UUCP password [verysecret] ' WIZZY_PASSWORD
read -p 'Web Administration password [teacher] ' WIZZY_WOFFLEPASSWD
echo Do not change these unless you know what you are doing ..
read -p 'Your network: [172.20.1] ' WIZZY_NETWORK
read -p 'Network in reverse: [1.20.172] ' WIZZY_NETWORKREV
read -p 'Last octet: [1] ' WIZZY_LASTOCTET

</tmp/ks.cfg >/tmp/ks.cfg- sed \
               -e s/_WIZZY_HOSTNAME_/${WIZZY_HOSTNAME:-myschool}/g \
               -e s/_WIZZY_PASSWORD_/${WIZZY_PASSWORD:-verysecret}/g \
               -e s/_WIZZY_WOFFLEPASSWD_/${WIZZY_WOFFLEPASSWD:-teacher}/g \
               -e s/_WIZZY_MESSENGERPASSWORD_/${WIZZY_MESSENGERPASSWORD:-xx}/g \
               -e s/_WIZZY_STREET_/"${WIZZY_STREET:-\"Main St.\"}"/g \
               -e s/_WIZZY_SCHOOLDISTRICT_/${WIZZY_SCHOOLDISTRICT:-KZN}/g \
               -e s/_WIZZY_NETWORK_/${WIZZY_NETWORK:-172.20.1}/g \
               -e s/_WIZZY_NETWORKREV_/${WIZZY_NETWORKREV:-1.20.172}/g \
               -e s/_WIZZY_MESSENGERIP_/${WIZZY_MESSENGERIP:-172.20.2.2}/g \
               -e s/_WIZZY_PPPNUMBER_/${WIZZY_PPPNUMBER:-0860007429}/g \
               -e s/_WIZZY_PPPUSERNAME_/${WIZZY_PPPUSERNAME:-saixuser}/g \
               -e s/_WIZZY_PPPPASSWORD_/${WIZZY_PPPPASSWORD:-secret}/g \
               -e s/_WIZZY_WIRELESSIP_/${WIZZY_WIRELESSIP:-172.20.2.1}/g \
               -e s/_WIZZY_WIRELESSNETWORK_/${WIZZY_WIRELESSNETWORK:-172.20.2}/g \
               -e s/_WIZZY_WIRELESSBROADCAST_/${WIZZY_WIRELESSBROADCAST:-172.20.2.255}/g \
               -e s/_WIZZY_LASTOCTET_/${WIZZY_LASTOCTET:-1}/g 
mv /tmp/ks.cfg- /tmp/ks.cfg
chvt 1
exec < /dev/tty1 > /dev/tty1

%post --nochroot
cp /tmp/ks.cfg /mnt/sysimage/root/wizzy-ks.cfg

%post
# create /etc/hosts file
cat > /etc/hosts <<EOF
127.0.0.1	localhost
_WIZZY_NETWORK_._WIZZY_LASTOCTET_	_WIZZY_HOSTNAME_.wizzy.org.za _WIZZY_HOSTNAME_
EOF