X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fltsp;h=d976c8ae8ec60fcd78dd3bc223e86e8195400923;hb=78453e212ec7952477a5de2f702bfcab54e7a89c;hp=30ed74c371d9558efc67698a190526f4a2c92bb7;hpb=3dae4c554ec18f465eb6ee5e6efdbdbe8557e13c;p=hvlinux.git diff --git a/stage5/pkg/ltsp b/stage5/pkg/ltsp index 30ed74c..d976c8a 100644 --- a/stage5/pkg/ltsp +++ b/stage5/pkg/ltsp @@ -1,28 +1,24 @@ -#!/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 @@ -60,21 +56,24 @@ cat > ${LTSROOT}/etc/lts.conf << "EOF" 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 +}