wok-next rev 11667

zsh: pre_remove restore sh link
author Richard Dunbar <mojo@slitaz.org>
date Thu Feb 16 16:33:16 2012 +0000 (2012-02-16)
parents a4087d70cc43
children d0bb394a96d0
files zsh/receipt
line diff
     1.1 --- a/zsh/receipt	Thu Feb 16 15:21:17 2012 +0000
     1.2 +++ b/zsh/receipt	Thu Feb 16 16:33:16 2012 +0000
     1.3 @@ -70,3 +70,16 @@
     1.4  		fi
     1.5  	fi
     1.6  }
     1.7 +
     1.8 +# Restore a valid sh link if needed.
     1.9 +pre_remove()
    1.10 +{
    1.11 +        local root
    1.12 +        root=$1
    1.13 +        sh=`readlink $root/bin/sh`
    1.14 +        if [ ! "$sh" = "busybox" ]; then
    1.15 +                rm $root/bin/sh &&
    1.16 +                ln -s /bin/busybox $root/bin/sh
    1.17 +        fi
    1.18 +}
    1.19 +