#!/bin/bash hvbuild() { LTSROOT="/opt/ltsp/i386" MAC_ADDRESS="01-00-40-63-c0-35-8f" LTSP_KERNEL="2.6.17.8-ltsp-1" LTSP_SERVER="192.168.0.4" if [ -d /tftpboot ]; then if [ -d /srv/tftpboot ]; then rm -v -rf /srv/tftpboot fi mv -v /tftpboot /srv/tftpboot fi cd /srv/tftpboot/lts/${LTSP_KERNEL}/pxelinux.cfg ln -v -s -f default ${MAC_ADDRESS} cat > ${LTSROOT}/etc/lts.conf << "EOF" [Default] # Uncomment to use custom XF86Config: ### XF86CONFIG_FILE = /tmp/XF86Config.1 RAMDISK_SIZE = "8192" SERVER = _LTSP_SERVER_ XSERVER = trident X_HORZSYNC = "31.5-80" X_VERTREFRESH = "60-70" X_COLOR_DEPTH = 16 X_MODE_0 = 1280x1024 X_MODE_1 = 1024x768 # Keyboard configuration XkbLayout = "ca_enhanced" # Mouse configuration X_MOUSE_PROTOCOL = "IMPS/2" X_MOUSE_DEVICE = "/dev/input/mice" X_MOUSE_RESOLUTION = "400" X_MOUSE_BUTTONS = "5" X_MOUSE_EMULATE3BTN = "Y" X_ZAxisMapping = "4 5" USE_XFS = N LOCAL_APPS = N USE_NFS_SWAP = N SCREEN_01 = startx SCREEN_02 = shell SOUND = Y SOUND_DAEMON = esd EOF sed -i -e "s!_LTSP_SERVER_!${LTSP_SERVER}!g" ${LTSROOT}/etc/lts.conf # LTSP-4.2 update 4: The "-public" option is absolutely necessary... sed -i -e \ "s!\( */bin/esd -nobeeps -tcp -port 16001\)\( -as 1 &\)!\1 -public\2!g"\ ${LTSROOT}/etc/rc.sound string_add "${LTSROOT} 192.168.0.0/24(rw,sync,no_root_squash)" \ /etc/exports string_add "option root-path \"${LTSP_SERVER}:${LTSROOT}\";" \ /etc/dhcpd.conf # no spaces but tabs to separate items. sed -i -e "s!^#\*\(.*#any host.*\)!\*\1!g" /etc/X11/xdm/Xaccess # By default this line is set, so that it is not listening to XDMCP # connection. This is for security reasons. sed -i -e "s%\(^DisplayManager\.requestPort:.*\)%!\1%g" \ /etc/X11/xdm/xdm-config }