Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37815830
en ru br
Репозитории ALT
S:0.7.6-alt1
5.1: 0.5.1-alt1
4.1: 0.1.1-alt1
4.0: 0.1.1-alt1
www.altlinux.org/Changes

Группа :: Система/Настройка/Прочее
Пакет: installer-feature-ltsp

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

installer-feature-ltsp-0.5.1/000075500000000000000000000000001134730740200161225ustar00rootroot00000000000000installer-feature-ltsp-0.5.1/Makefile000064400000000000000000000004121134730740200175570ustar00rootroot00000000000000install2_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.5.1/postinstall.d/000075500000000000000000000000001134730740200207205ustar00rootroot00000000000000installer-feature-ltsp-0.5.1/postinstall.d/71-network-shares-nfssec-REVERT.sh000075500000000000000000000002471134730740200267470ustar00rootroot00000000000000#!/bin/sh -efu

. install2-init-functions

nfsconf='/etc/sysconfig/nfs'

[ ! -f "$destdir$nfsconf" ] || sed -i 's/SECURE_NFS=yes/# SECURE_NFS=yes/' "$destdir$nfsconf"
installer-feature-ltsp-0.5.1/preinstall.d/000075500000000000000000000000001134730740200205215ustar00rootroot00000000000000installer-feature-ltsp-0.5.1/preinstall.d/98-eth0000075500000000000000000000006441134730740200215510ustar00rootroot00000000000000#!/bin/sh
# hardwire eth0 at 192.168.0.1/24

. install2-init-functions

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

# this default is hardwired in several more places at the moment...
mkdir -p $IFACEDIR/eth{0,1}
echo 192.168.0.1/24 > "$IFACEDIR/eth0/ipv4address"
cat > "$IFACEDIR/eth0/options" << EOF
TYPE=eth
BOOTPROTO=static
NM_CONTROLLED=no
DISABLED=no
EOF

# just in case
echo "NM_CONTROLLED=no" > "$IFACEDIR/eth1/options"
installer-feature-ltsp-0.5.1/preinstall.d/98-ltsp000075500000000000000000000100351134730740200216660ustar00rootroot00000000000000#!/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, 2009, 2010 Michael Shigorin <mike@altlinux.org>

. install2-init-functions

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

MOUNTED=
LBCCONF="$destdir/etc/ltsp/ltsp-build-client.conf"
cdrom_stage3="${cdrom_stage3:-/media/cdrom}"

[ "$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

### FIXME: override until ltsp package is updated too
#grep ^KERNEL= "$LBCCONF" || echo 'KERNEL="kernel-image-tmc-tc"' >> "$LBCCONF"
echo 'KERNEL="kernel-image-tmc-tc"' >> "$LBCCONF"
echo 'KERNEL_MODULES="alsa compcache drm fglrx nvidia"' >> "$LBCCONF"

# mc :( nx :)
echo 'LATE_PACKAGES="mc ltsp-client-nxsession"' >> "$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 ||:

# enable XDMCP
# FIXME: kde3/4's kdm: bloody hack, need proper control support
for kdmrc in $destdir/etc/X11/kdm{,4}/kdmrc; do
[ -f "$kdmrc" ] && sed -ir 's/^Enable=false/Enable=true/' "$kdmrc" ||:
done
# gdm
[ -f "$destdir/etc/control.d/facilities/gdm_xdmcp" ] \
&& run_chroot control gdm/xdmcp enabled ||:

# 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"
installer-feature-ltsp-0.5.1/preinstall.d/98-startup000075500000000000000000000071571134730740200224210ustar00rootroot00000000000000#!/bin/sh
# bloody hack to speed up and clean up terminals' boot
# should be fixed properly by passing "fastboot" in kernel args
# and then enhanced by adding "diskless" support in startup

. install2-init-functions

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

ltspdir=$destdir/var/lib/ltsp/i586
mv $ltspdir/etc/rc.d/rc.sysinit{,-default}
cat > $ltspdir/etc/rc.d/rc.sysinit-ltsp << "__EOF__"
#!/bin/sh
#
# /etc/rc.d/rc.sysinit - run once at boot time
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
# Taken to parts for diskless LTSP clients.
#

trap '' SIGPIPE

WITHOUT_RC_COMPAT=1

# Source function library
. /etc/init.d/functions

# Fix console loglevel
dmesg -n "$LOGLEVEL"

HOSTNAME=`hostname`

if [ -z "$HOSTNAME" -o "$HOSTNAME" = "(none)" ]; then
hostname localhost
fi

# Set system font
ExecIfExecutable /sbin/setsysfont >/dev/null 2>&1 && SETSYSFONT_DONE=1 || SETSYSFONT_DONE=

PrintMargin()
{
if [ "$BOOTUP" != serial ]; then
local n
n=`echo -n "$*" |wc -c` 2>/dev/null &&
tput hpa $(( (COLUMNS - n)/2 ))
fi
}

# Print a banner. ;)
WELCOME="Welcome to "
BANNER="ALT Linux"
PrintMargin "$WELCOME$BANNER"
echo -n "$WELCOME"
SETCOLOR_INFO
echo -n "$BANNER"
SETCOLOR_NORMAL
echo

# Mount /proc (done here so volume labels can work with fsck)
action "Mounting proc filesystem:" mount -n -t proc proc /proc
chgrp proc /proc >/dev/null 2>&1 ||:

# Mount /sys where appropriate
if grep -wqs sysfs /proc/filesystems; then
action "Mounting sys filesystem:" mount -n -t sysfs sysfs /sys
fi

# Load modules
/etc/rc.d/scripts/load_modules

RUN_UDEV=
udevd_exe=/etc/init.d/udevd
[ ! -x "$udevd_exe" ] ||
grep -iwqs noudev /proc/cmdline ||
RUN_UDEV=1

# Start udev
if [ -n "$RUN_UDEV" ]; then
RUN_FROM_SYSINIT=1 "$udevd_exe" start
[ -c /dev/rtc ] || modprobe rtc >/dev/null 2>&1
fi

# Remount the root filesystem read-write
action "Remounting root filesystem in read/write mode:" ${REMOUNT_ROOTFS_RW_COMMAND:-mount -n -o remount,rw /}

# The root filesystem is now read-write, so we can now log via syslog() directly
[ -z "$IN_INITLOG" ] || IN_INITLOG=

# Configure kernel parameters
action "Configuring kernel parameters:" sysctl -e -p /etc/sysctl.conf

if [ -z "$RUN_UDEV" ]; then
sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
sysctl -w kernel.hotplug="/sbin/hotplug" >/dev/null 2>&1
fi

OLD_COLUMNS="$COLUMNS"

# Load framebuffer device settings
/etc/rc.d/scripts/framebuffer_init

# Set system font again, if required
if [ "$OLD_COLUMNS" != "$COLUMNS" ]; then
ExecIfExecutable /sbin/setsysfont >/dev/null 2>&1 && SETSYSFONT_DONE=1 || SETSYSFONT_DONE=
fi

# Mount all other filesystems (except for NFS and /proc, which is already
# mounted). Contrary to standard usage,
# filesystems are NOT unmounted in single user mode
# (pixel) also do not mount loopback, will be done later
action 'Mounting local filesystems:' mount -a -t nocifs,davfs,ftpfs,loop,ncp,ncpfs,nfs,panfs,proc,smbfs,sshfs -O no_netdev

# Set system font again, if required
[ -n "$SETSYSFONT_DONE" ] || ExecIfExecutable /sbin/setsysfont >/dev/null 2>&1

# Do the following while waiting for an 'I' from the user...
{

# Now turn on swap again (in case we swap to files)
action "Activating swap space:" swapon -a

# Initialize the serial ports
ExecIfExecutable /etc/rc.d/rc.serial

# Now that we have all of our basic modules loaded and the kernel going,
# let's dump the syslog ring somewhere so we can find it later
dmesg >/var/log/dmesg
kill -TERM `pidof getkey` >/dev/null 2>&1

} &

if [ -n "$PROMPT" ]; then
getkey i || PROMPT=
fi
wait

if [ -n "$PROMPT" ]; then
touch /var/run/confirm
fi
__EOF__
chmod +x $ltspdir/etc/rc.d/rc.sysinit-ltsp
ln -s rc.sysinit-ltsp $ltspdir/etc/rc.d/rc.sysinit
:
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin