mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 09:17:08 +00:00
Initial
This commit is contained in:
32
packages/base/all/vendor-config-onl/src/bin/onlinitrd
Executable file
32
packages/base/all/vendor-config-onl/src/bin/onlinitrd
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
############################################################
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: $0 <initrd url>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ARCH=`uname -m`
|
||||
case $ARCH in
|
||||
x86_64)
|
||||
;;
|
||||
*)
|
||||
echo "This script cannot be used on $ARCH platforms."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
PLATFORM=$(cat /etc/onl/platform)
|
||||
|
||||
dir=`mktemp -d`
|
||||
rc=
|
||||
|
||||
if (cd $dir && wget $1); then
|
||||
onlfs rw boot mv $dir/* /mnt/onl/boot/${PLATFORM}.cpio.gz
|
||||
rc=0
|
||||
else
|
||||
echo "Download failed."
|
||||
rc=1
|
||||
fi
|
||||
|
||||
rmdir $dir
|
||||
exit $rc
|
||||
Reference in New Issue
Block a user