#!/bin/sh

cd /mnt/runtime/modules
rm *
cd /modules
rm *

rm /bin/loader
cd /tmp
mkdir lib
cd lib
uncpio < /usr/lib/python1.5.cgz
uncpio < /usr/lib/anaconda.cgz
cd /usr/lib
ln -s /tmp/lib/python1.5 python1.5
ln -s /tmp/lib/anaconda anaconda
rm python1.5.cgz
rm anaconda.cgz

cd /tmp
uncpio < /usr/bin/python1.5.cgz 
chmod 0755 python1.5
cd /usr/bin
rm python1.5.cgz
ln -s /tmp/python1.5 /usr/bin/python1.5

cd /usr
uncpio < X11R6.cgz
rm X11R6.cgz

cd /usr/lib
for n in *.cgz; do
    uncpio < $n
    rm $n
done

cd /usr/sbin
uncpio < sbin.cgz
rm sbin.cgz

cd /lib
uncpio < libs.cgz
rm libs.cgz

cd /

exec /usr/bin/anaconda.real -T $*
