slitaz-modular rev 57

Add setup-live script. Its meant to help setup up livecd if you build it with slitaz-modular script.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Apr 10 17:30:09 2011 +0000 (2011-04-10)
parents cc310edb8c9c
children af1ed0392288
files initramfs/usr/bin/setup-live
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/initramfs/usr/bin/setup-live	Sun Apr 10 17:30:09 2011 +0000
     1.3 @@ -0,0 +1,24 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +. /etc/slitaz/slitaz.conf
     1.7 +
     1.8 +PKG_ORDER="$(find /mnt/live/mnt/* -name "packages-order.txt" -maxdepth 1)"
     1.9 +
    1.10 +if [ -f $PKG_ORDER ]; then
    1.11 +	echo "Reconfigure packages in $PKG_ORDER"
    1.12 +	for i in $(cat $PKG_ORDER); do
    1.13 +		if [ ! -f $INSTALLED/$i/$i.done_post_install ]; then
    1.14 +			tazpkg reconfigure $i
    1.15 +			touch $INSTALLED/$i/$i.done_post_install
    1.16 +		fi
    1.17 +		if [ -f $INSTALLED/$i/pkgmd5 ]; then
    1.18 +			[ -f $INSTALLED/$i/receipt ] && source $INSTALLED/$i/receipt
    1.19 +			if [ $(cat $LOCALSTATE/installed.md5 | grep -i " ${PACKAGE}-${VERSION}${EXTRAVERSION}.tazpkg") ]; then
    1.20 +				sed -i "/ $PACKAGE-$VERSION${EXTRAVERSION}.tazpkg/d" $LOCALSTATE/installed/installed.md5
    1.21 +				cat $INSTALLED/$i/pkgmd5 >> $LOCALSTATE/installed.md5
    1.22 +			else
    1.23 +				cat $INSTALLED/$i/pkgmd5 >> $LOCALSTATE/installed.md5
    1.24 +			fi
    1.25 +		fi
    1.26 +	done
    1.27 +fi