slitaz-modular view initramfs/usr/bin/setup-live @ rev 63

Up: Fixed setup-live script only reconfigure packages that have post_install function in receipts.
author Christopher Rogers <slaxemulator@gmail.com>
date Tue Apr 12 17:59:26 2011 +0000 (2011-04-12)
parents 309d8b00944f
children 9b3fbf999edf
line source
1 #!/bin/sh
3 . /etc/slitaz/slitaz.conf
5 PKG_ORDER="$(find /mnt/live/mnt/* -name "packages-order.txt" -maxdepth 1)"
7 if [ -f $PKG_ORDER ]; then
8 echo "Reconfigure packages in $PKG_ORDER"
9 for i in $(cat $PKG_ORDER); do
10 if [ ! -f $INSTALLED/$i/$i.done_post_install ]; then
11 if [ -f $INSTALLED/$i/receipt ]; then
12 if [ $(grep -l '^post_install' $INSTALLED/$i/receipt) ]; then
13 tazpkg reconfigure $i
14 touch $INSTALLED/$i/$i.done_post_install
15 fi
16 fi
17 fi
18 if [ -f $INSTALLED/$i/pkgmd5 ]; then
19 [ -f $INSTALLED/$i/receipt ] && source $INSTALLED/$i/receipt
20 if [ $(cat $LOCALSTATE/installed.md5 | grep -i " ${PACKAGE}-${VERSION}${EXTRAVERSION}.tazpkg") ]; then
21 sed -i "/ $PACKAGE-$VERSION${EXTRAVERSION}.tazpkg/d" $LOCALSTATE/installed/installed.md5
22 cat $INSTALLED/$i/pkgmd5 >> $LOCALSTATE/installed.md5
23 else
24 cat $INSTALLED/$i/pkgmd5 >> $LOCALSTATE/installed.md5
25 fi
26 fi
27 done
28 fi