mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 09:17:08 +00:00
Architecture and error checking.
This commit is contained in:
@@ -5,9 +5,28 @@ if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ARCH=`uname -m`
|
||||
case $ARCH in
|
||||
armv7l|ppc)
|
||||
;;
|
||||
*)
|
||||
echo "This script cannot be used on $ARCH platforms."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
PLATFORM=$(cat /etc/onl/platform)
|
||||
|
||||
dir=`mktemp -d`
|
||||
(cd $dir && wget $1)
|
||||
onlfs rw boot mv $dir/* /mnt/onl/boot/${PLATFORM}.itb
|
||||
rc=
|
||||
|
||||
if (cd $dir && wget $1); then
|
||||
onlfs rw boot mv $dir/* /mnt/onl/boot/${PLATFORM}.itb
|
||||
rc=0
|
||||
else
|
||||
echo "Download failed."
|
||||
rc=1
|
||||
fi
|
||||
|
||||
rmdir $dir
|
||||
exit $rc
|
||||
|
||||
@@ -5,7 +5,26 @@ if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ARCH=`uname -m`
|
||||
case $ARCH in
|
||||
x86_64)
|
||||
;;
|
||||
*)
|
||||
echo "This script cannot be used on $ARCH platforms."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
dir=`mktemp -d`
|
||||
(cd $dir && wget $1)
|
||||
onlfs rw boot mv $dir/* /mnt/onl/boot
|
||||
rc=
|
||||
|
||||
if (cd $dir && wget $1); then
|
||||
onlfs rw boot mv $dir/* /mnt/onl/boot
|
||||
rc=0
|
||||
else
|
||||
echo "Download failed."
|
||||
rc=1
|
||||
fi
|
||||
|
||||
rmdir $dir
|
||||
exit $rc
|
||||
|
||||
Reference in New Issue
Block a user