-#!/bin/sh
-set -o errexit
-
-# Reading system configuration informations, functions and package versions.
-source ../sysinfos
-source ../functions
-source ../packages-list
-
-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
+#!/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"
- mv -v /tftpboot /srv/tftpboot
-fi
+ if [ -d /tftpboot ]; then
+ if [ -d /srv/tftpboot ]; then
+ rm -v -rf /srv/tftpboot
+ fi
-cd /srv/tftpboot/lts/${LTSP_KERNEL}/pxelinux.cfg
-ln -v -s -f default ${MAC_ADDRESS}
+ mv -v /tftpboot /srv/tftpboot
+ fi
-cat > ${LTSROOT}/etc/lts.conf << "EOF"
+ 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
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
+ sed -i -e "s!_LTSP_SERVER_!${LTSP_SERVER}!g" ${LTSROOT}/etc/lts.conf
-string_add "${LTSROOT} 192.168.0.0/24(rw,sync,no_root_squash)" /etc/exports
+ # 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 "option root-path \"${LTSP_SERVER}:${LTSROOT}\";" /etc/dhcpd.conf
+ string_add "${LTSROOT} 192.168.0.0/24(rw,sync,no_root_squash)" \
+ /etc/exports
-# no spaces but tabs to separate items.
-sed -i -e "s!^#\*\(.*#any host.*\)!\*\1!g" /etc/X11/xdm/Xaccess
+ string_add "option root-path \"${LTSP_SERVER}:${LTSROOT}\";" \
+ /etc/dhcpd.conf
-# 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
+ # no spaces but tabs to separate items.
+ sed -i -e "s!^#\*\(.*#any host.*\)!\*\1!g" /etc/X11/xdm/Xaccess
-exit $?
+ # 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
+}