Remove TCP Vegas support (ARM7)
[tomato.git] / release / src-rt-6.x.4708 / router / others / entware-install.sh
blob433c4d6ae13776366719e3abaec6c7e00a33d8ed
1 #!/bin/sh
3 echo "Info: Checking for prerequisites and creating folders..."
5 if [ -d /opt ]
6 then
7 echo "Warning: Folder /opt exists!"
8 else
9 mkdir /opt
11 for folder in bin etc/init.d lib/opkg sbin share tmp usr var/log var/lock var/run
13 if [ -d "/opt/$folder" ]
14 then
15 echo "Warning: Folder /opt/$folder exists!"
16 echo "Warning: If something goes wrong please clean /opt folder and try again."
17 else
18 mkdir -p /opt/$folder
20 done
22 echo "Info: Opkg package manager deployment..."
23 CURARCH="armv7"
24 DLOADER="ld-linux.so.3"
25 URL=http://pkg.entware.net/binaries/$CURARCH/installer
26 wget $URL/opkg -O /opt/bin/opkg
27 chmod +x /opt/bin/opkg
28 wget $URL/opkg.conf -O /opt/etc/opkg.conf
29 wget $URL/ld-2.23.so -O /opt/lib/ld-2.23.so
30 wget $URL/libc-2.23.so -O/opt/lib/libc-2.23.so
31 wget $URL/libgcc_s.so.1.2.23 -O /opt/lib/libgcc_s.so.1
32 cd /opt/lib
33 chmod +x ld-2.23.so
34 ln -s ld-2.23.so $DLOADER
35 ln -s libc-2.23.so libc.so.6
37 echo "Info: Basic packages installation..."
38 /opt/bin/opkg update
39 /opt/bin/opkg install entware-opt
40 if [ ! -f /opt/usr/lib/locale/locale-archive ]
41 then
42 wget http://pkg.entware.net/binaries/other/locale-archive.2.23 -O /opt/usr/lib/locale/locale-archive
45 echo "Info: Congratulations!"
46 echo "Info: If there are no errors above then Entware-ng was successfully initialized."
47 echo "Info: Add /opt/bin & /opt/sbin to your PATH variable"
48 echo "Info: Add '/opt/etc/init.d/rc.unslung start' to startup script for Entware-ng services to start"
49 echo "Info: Found a Bug? Please report at https://github.com/Entware-ng/Entware-ng/issues"