wok-next rev 9610
bash: Fixed bash pre_remove function to work with --root in tazpkg.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri Apr 15 14:55:42 2011 +0000 (2011-04-15) |
parents | 5d4c85d6bc60 |
children | 9e8cd7598a81 |
files | bash/receipt |
line diff
1.1 --- a/bash/receipt Fri Apr 15 05:22:23 2011 +0200 1.2 +++ b/bash/receipt Fri Apr 15 14:55:42 2011 +0000 1.3 @@ -73,9 +73,11 @@ 1.4 # Restore a valid sh link if needed. 1.5 pre_remove() 1.6 { 1.7 - sh=`readlink /bin/sh` 1.8 + local root 1.9 + root=$1 1.10 + sh=`readlink $root/bin/sh` 1.11 if [ ! "$sh" = "busybox" ]; then 1.12 - rm /bin/sh && 1.13 - ln -s /bin/busybox /bin/sh 1.14 + rm $root/bin/sh && 1.15 + ln -s /bin/busybox $root/bin/sh 1.16 fi 1.17 }