# HG changeset patch # User Pascal Bellard # Date 1204984502 0 # Node ID 6909e27a7f91f6a69fe61b5e81199d68d654cfab # Parent 526c779c93319cc830be716a2d4e40f5f82c1196 Slitaz-loram*: do not remove itself during install... diff -r 526c779c9331 -r 6909e27a7f91 slitaz-loram-cdrom/receipt --- a/slitaz-loram-cdrom/receipt Sat Mar 08 13:37:54 2008 +0100 +++ b/slitaz-loram-cdrom/receipt Sat Mar 08 13:55:02 2008 +0000 @@ -19,19 +19,20 @@ local line local i tag="Handle kernel cmdline parameter config" - i=$(grep -n "$tag" /etc/init.d/rcS | cut -d: -f1) + i=$(grep -n "$tag" $1/etc/init.d/rcS | cut -d: -f1) i=$(($i-1)) - tag=$(grep "$tag" /etc/init.d/rcS) - if [ "$1" = "-R" ]; then + tag=$(grep "$tag" $1/etc/init.d/rcS) + if [ "$2" = "-R" ]; then line="-$(($i-24)),26 +$(($i-24)),2" i="-" else + grep -q 'if [ -d /cdrom ]; then' $1/etc/init.d/rcS && return line="-$i,2 +$i,26" i="+" fi cat < /dev/null) - [ -n "$loram" ] && yes y | tazpkg remove $loram + [ -n "$loram" -a "$loram" != "$PACKAGE" ] && yes y | tazpkg remove $loram } post_install() { - get_patch | patch -p0 + local root + root=$1 + get_patch "$root" | patch -p0 if [ ! -x /bin/funionfs ]; then cat < /dev/null) - [ -n "$loram" ] && yes y | tazpkg remove $loram + [ -n "$loram" -a "$loram" != "$PACKAGE" ] && yes y | tazpkg remove $loram } post_install() { - get_patch | patch -p0 + local root + root=$1 + get_patch "$root" | patch -p0 if [ ! -x /bin/funionfs ]; then cat <