D. Grunewald wrote:
> Hi @ all !
>
> Just a short question.
> Are there now any possibilities to make local swap
> at the clients available ?

yes, try this "hd_swap" startscript :

------------------------------------------------------
#!/bin/sh
#
# /opt/ltsp/i386/etc/rc.d/hd_swap
#
#
###################################################
# Probe in the modules
modprobe ide-mod
modprobe ide-probe-mod
modprobe ide-disk

###########  Mount any swap available ############
if [ -d /dev/ide/hd ]
then
SWAP=`fdisk -l /dev/ide/hd/c?b?t?u? | grep swap | tail -n 1 | cut -d' ' -f 1`
2>/dev/null
if [ ! "$SWAP" = "" ]
then # A linux swap disk is available
        modprobe blkdev_swap
        echo "Swapping onto $SWAP"
        swapon $SWAP
else # try to create a swapfile on an MSDOS fs
    SWAP=`fdisk -l /dev/ide/hd/c?b?t?u? | grep FAT | tail -n 1 | cut -d' ' -f 
1`
2>/dev/null
    if [ ! "$SWAP" = "" ]
    then # got a DOS fs
        modprobe blkdev_swap
        if [ ! -d /mnt/dos ]
        then
                mkdir /mnt/dos
        fi
        mount -t msdos $SWAP /mnt/dos
        if [ ! -f /mnt/dos/LNX_SWAP ]
        then
           echo "Creating a swap file on the DOS partition"
           #dd if=/dev/zero of=/mnt/dos/LNX_SWAP bs=1024 count=32768
           /sbin/prep_swap -s 32m -f /mnt/dos/LNX_SWAP
           if [ $? -eq 0 ]
           then
              echo "Successfully built swapfile"
           fi
        fi
        if [ -f /mnt/dos/LNX_SWAP ]
        then
           mkswap -v1 /mnt/dos/LNX_SWAP
           swapon /mnt/dos/LNX_SWAP
        fi
    fi
fi
fi
-----------------------------------------------------



_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.openprojects.net

Reply via email to