installer-feature-ltsp-0.2.3/000075500000000000000000000000001115375754400161345ustar00rootroot00000000000000installer-feature-ltsp-0.2.3/Makefile000064400000000000000000000004121115375754400175710ustar00rootroot00000000000000install2_dir=$(datadir)/install2 install: install -d $(install2_dir) [ -d initinstall.d ] && cp -a initinstall.d $(install2_dir) ||: [ -d preinstall.d ] && cp -a preinstall.d $(install2_dir) ||: [ -d postinstall.d ] && cp -a postinstall.d $(install2_dir) ||: installer-feature-ltsp-0.2.3/preinstall.d/000075500000000000000000000000001115375754400205335ustar00rootroot00000000000000installer-feature-ltsp-0.2.3/preinstall.d/98-eth0000075500000000000000000000004731115375754400215630ustar00rootroot00000000000000#!/bin/sh # hardwire eth0 at 192.168.0.1/24 . install2-init-functions IFACEDIR="$destdir/etc/net/ifaces/eth0" # this default is hardwired in several more places at the moment... mkdir -p "$IFACEDIR" ||: echo 192.168.0.1/24 > "$IFACEDIR/ipv4address" cat > "$IFACEDIR/options" << EOF TYPE=eth BOOTPROTO=static EOF installer-feature-ltsp-0.2.3/preinstall.d/98-ltsp000075500000000000000000000070511115375754400217040ustar00rootroot00000000000000#!/bin/sh # first shot at setting up LTSP5 # see alsp http://www.freesource.info/wiki/Dokumentacija/LTSP5 # # currently depends on postinstall.d/06-pxe.sh for tftp/portmap fixes # # TODO: move this script into a feature subpackage, see also # http://www.freesource.info/wiki/TZ/AltLinux/WhiteLabel # # 2007, 2008 Michael Shigorin . install2-init-functions [ -z "$AUTOINSTALL" ] || exit 0 MOUNTED= LBCCONF="$destdir/etc/ltsp/ltsp-build-client.conf" [ "$METHOD" = "cdrom" -a -n "$CDROMDEV" ] && { MOUNTED="$destdir/$cdrom_stage3" mkdir -p "$MOUNTED" mount -o ro "$CDROMDEV" "$MOUNTED" || MOUNTED= } # FIXME: probably ltsp-build-client should be fixed not to interfere # with system apt configuration and caches cp -a $destdir/var/lib/apt/lists/ $destdir/tmp/ # obsolete module might still be mentioned -- replace it subst 's,r1000,r8168,' "$LBCCONF" ||: # use installation media, not ftp.altlinux.org subst 's,MIRROR=.*,MIRROR="rpm file:/media/cdrom ALTLinux main ltsp",' "$LBCCONF" ||: # use thin client flavour with patches against nfs swap deadlocks grep ^KERNEL= "$LBCCONF" || echo 'KERNEL="kernel-image-led-tc"' >> "$LBCCONF" mkdir -p $destdir/root/.ltsp-log/ ||: # exec_chroot doesn't suppress stdout *and* resets environment #exec_chroot ltsp-build-client 2>&1 | tee $destdir/root/.ltsp-log/ltsp-build-client.log # don't do env *-i* env PATH="/sbin:/usr/sbin:$PATH" HOME="/root" TMPDIR="/tmp" chroot "$destdir" ltsp-build-client 2>&1 \ | tee $destdir/root/.ltsp-log/ltsp-build-client.log # FIXME: /dev/console somehow gets lost :-( # very much likely that something's overly eager with cleanup cp -a /dev/console $destdir/var/lib/ltsp/i586/dev/console ||: # configure base services for 192.168.0.1/24 on some interface # FIXME: LTSP network prefix should become configurable some day... cp -a $destdir/etc/ltsp/dhcpd.conf $destdir/etc/dhcp ||: subst 's/only_from = 127.0.0.1/only_from = 192.168.0.0\/24/' $destdir/etc/xinetd.conf ||: subst 's/-port -1 //' $destdir/etc/sysconfig/xfs ||: subst 's/ -nolisten tcp//' $destdir/etc/X11/xinit/xserverrc ||: # KDM pls (TODO: other dms too in case they are?) sed -ir 's/^Enable=false/Enable=true/' $destdir/etc/X11/kdm/kdmrc ||: # chkconfig&restart services needed # tftp is xinetd-based, service has nothing to do there # NB: also done in 06-pxe.sh run_chroot chkconfig nfs on ||: run_chroot chkconfig dm on ||: run_chroot chkconfig xfs on ||: run_chroot chkconfig tftp on ||: run_chroot chkconfig dhcpd on ||: run_chroot chkconfig xinetd on ||: run_chroot chkconfig portmap on ||: # add localdev support -- we're on hardware not in VE okay? grep -q ^fuse $destdir/etc/modules || echo fuse >> $destdir/etc/modules run_chroot control fusermount public ||: # FIXME: all hardwired, but a lot of stuff needs to be reconfigured either # (when ltsp network is going to be configurable); so: # care for resolving in the most crude manner possible grep -q ^192.168.0.1 $destdir/etc/hosts || echo "192.168.0.1 server server.ltsp" >> $destdir/etc/hosts grep -q ^192.168.0.250 $destdir/etc/hosts || { for i in `seq 20 250`; do echo "192.168.0.$i ws$i ws$i.ltsp" >> $destdir/etc/hosts done } run_chroot update_chrooted conf # prepare mini CD image to boot PXE-less thin clients run_chroot ltsp-mkbootiso -o /opt/ltsp-boot.iso ||: # FIXME: workaround for tricky aptwork in ltsp-build-client, part II rm -f $destdir/var/cache/apt/*.bin ||: rm -f $destdir/var/cache/apt/gen{src,pkg}list/* ||: rm -rf $destdir/var/lib/apt/lists/ ||: mv $destdir/tmp/lists/ $destdir/var/lib/apt ||: [ -n "$MOUNTED" ] && umount "$MOUNTED"