1898 |
fi |
fi |
1899 |
done |
done |
1900 |
|
|
1901 |
count="${count}+1" |
count="$(( ${count}+1 ))" |
1902 |
|
|
1903 |
# fill output up with zeros |
# fill output up with zeros |
1904 |
for (( i=${#count}; i < 4; i++ )); do output="${output}0"; done |
for (( i=${#count}; i < 4; i++ )); do output="${output}0"; done |
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 |
3445 |
|
|
3446 |
mprintfeatures() |
mprintfeatures() |
3447 |
{ |
{ |
3448 |
echo "Global features: ${MAGE_FEATURES_GLOBAL[*]}" |
echo -e "${COLRED}Global features:${COLDEFAULT} ${MAGE_FEATURES_GLOBAL[*]}" |
3449 |
echo "Local features: ${MAGE_FEATURES[*]}" |
echo -e "${COLYELLOW}Local features:${COLDEFAULT} ${MAGE_FEATURES[*]}" |
3450 |
echo "Current features: ${MAGE_FEATURES_CURRENT[*]}" |
echo -e "${COLGREEN}Current features:${COLDEFAULT} ${MAGE_FEATURES_CURRENT[*]}" |
3451 |
} |
} |