Diff of /branches/mage-next/src/mage4.functions.sh.in
Parent Directory | Revision Log | Patch
revision 1781 by niro, Mon Mar 12 23:21:52 2012 UTC | revision 1952 by niro, Fri Oct 12 12:59:32 2012 UTC | |
---|---|---|
# | Line 3261 EOF | Line 3261 EOF |
3261 | need_busybox_support() | need_busybox_support() |
3262 | { | { |
3263 | local cmd | local cmd |
3264 | local busybox | |
3265 | cmd="$1" | cmd="$1" |
3266 | ||
3267 | if [[ -x /bin/busybox ]] | for busybox in {,/usr}/bin/busybox |
3268 | then | do |
3269 | if [[ $(readlink $(which ${cmd})) = /bin/busybox ]] | if [[ -x ${busybox} ]] |
3270 | then | then |
3271 | # needs busybox support | if [[ $(readlink $(which ${cmd})) = ${busybox} ]] |
3272 | return 0 | then |
3273 | # needs busybox support | |
3274 | return 0 | |
3275 | fi | |
3276 | fi | fi |
3277 | fi | done |
3278 | ||
3279 | # no busybox | # no busybox |
3280 | return 1 | return 1 |
|