wok diff zsh/receipt @ 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 | 93efe993d312 |
children | 605079172258 |
line diff
1.1 --- a/zsh/receipt Wed Oct 26 20:10:43 2011 +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 +