#!/bin/sh
#
# download.sh, 1.5     00/02/16
# Download script to kill incompatible daemons and
# start the appropriate download utility.
#
DOWNLOAD="$032"
if [ -f /usr/bin/isainfo ]; then
    isainfo -kv | grep "64-bit" >/dev/null
    if [ $? -eq 0 ]; then
      DOWNLOAD="$064"
    fi
fi

# Stop RM6 array monitor daemon
if [ -f /etc/init.d/amdemon ]; then
    /etc/init.d/amdemon stop
fi


# Start download utility
$DOWNLOAD $*


# Start RM6 array monitor daemon
if [ -f /etc/init.d/amdemon ]; then
    /etc/init.d/amdemon start
fi
