#!/bin/sh # Michael Shigorin, 2007 # a script to install standalone LTSP5 server # based on ALT Linux 4.0/branch dated 20070911 # (ltsp5-server-5.0-alt0.44) # NB: don't forget to umount extra NFS mounts # and rm -rf /var/lib/ltsp5/i586 in case of # script failure before re-running it # our office specific parts mkdir -p /pub mount nfs:/var/ftp/pub /pub cp -a /pub/Linux/ALT/sources.list.d/4.0-i586.list /etc/apt/sources.list.d/ rm -f /etc/apt/sources.list.d/sources.list # install packages needed; choose KDE variant apt-get update && apt-get install -y ltsp5-server-kde || exit 1 # local specifics again subst 's,MIRROR=.*,MIRROR=file:/pub/Linux/ALT/4.0/branch,' /etc/ltsp/ltsp-build-client.conf echo EXTRA_MIRROR='"file:/pub/Linux/ALT/local/4.0 i586 hasher"' >> /etc/ltsp/ltsp-build-client.conf ltsp-build-client || exit 2 # configure base services for 192.168.0.1/24 on some interface mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.BAK cp -a /etc/ltsp/dhcpd.conf /etc/dhcp subst 's/only_from = 127.0.0.1/only_from = 192.168.0.0\/24/' /etc/xinetd.conf subst 's/^PORTMAP_ARGS/#&/' /etc/sysconfig/portmap subst 's/-port -1 //' /etc/sysconfig/xfs #grep ^Enable /etc/X11/kdm/kdmrc # chkconfig&restart services needed # tftp is xinetd-based, service has nothing to do there chkconfig dm on chkconfig tftp on chkconfig xinetd on chkconfig portmap on service dhcpd restart service xinetd restart service portmap restart service nfs restart service ltspswapd restart service xfs restart service dm restart # add localdev support -- we're on hardware not in VE okay? grep -q ^fuse /etc/modules || echo fuse >> /etc/modules modprobe fuse control fusermount public # care for resolving in the most crude manner possible grep -q ^192.168.0.1 /etc/hosts || echo "192.168.0.1 server server.ltsp" >> /etc/hosts grep -q ^192.168.0.250 /etc/hosts || { for i in `seq 20 250`; do echo "192.168.0.$i ws$i ws$i.ltsp" >> /etc/hosts done } update_chrooted conf