Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37846625
en ru br
ALT Linux repositórios
S:0.7.6-alt1
5.0: 0.2.3-alt1
4.1: 0.1.1-alt1
4.0: 0.1.1-alt1

Group :: Sistema/Configurações/Rede
RPM: installer-feature-ltsp

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

installer-feature-ltsp-0.1.1/000075500000000000000000000000001100310561500161055ustar00rootroot00000000000000installer-feature-ltsp-0.1.1/Makefile000064400000000000000000000004121100310561500175420ustar00rootroot00000000000000install2_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.1.1/preinstall.d/000075500000000000000000000000001100310561500205045ustar00rootroot00000000000000installer-feature-ltsp-0.1.1/preinstall.d/98-eth0.sh000075500000000000000000000012541100310561500221430ustar00rootroot00000000000000#!/bin/sh
# hardwire eth0 at 192.168.0.1/24

. install2-init-functions

IFACEDIR="$destdir/etc/net/ifaces/eth0"

bind_by_mac()
{
MAC="`ip li sh dev $1 | fgrep 'link/ether' | sed 's#^ *link/ether ##' | cut -d' ' -f1`"
[ -z "$MAC" ] || echo "$1 mac $MAC" >> "$destdir/etc/iftab"
}

# 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

# bind by MAC address
# see also https://bugzilla.altlinux.org/show_bug.cgi?id=14872
IFS=': '
ip li | fgrep -B1 link/ether \
| while read num iface junk; do
bind_by_mac "$iface"
read nextline
done
installer-feature-ltsp-0.1.1/preinstall.d/99-ltsp.sh000075500000000000000000000067601100310561500222750ustar00rootroot00000000000000#!/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 <mike@altlinux.org>

. install2-init-functions

[ -z "$AUTOINSTALL" ] || exit 0

MOUNTED=
LBCCONF="$destdir/etc/ltsp/ltsp-build-client.conf"

[ "$METHOD" = "cdrom" -a -n "$CDROMDEV" ] && {
MOUNTED="$destdir/media/cdrom"
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 base disk",' "$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 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"
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009