This repository has been archived by the owner on Nov 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentware_install_arm.sh
executable file
·62 lines (56 loc) · 2.02 KB
/
entware_install_arm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
#useConfirm=true - comment out the line below like this to disable confirmation
useConfirm=true
confirm() {
[ "$useConfirm" = true ] && read -p "Proceed? (Enter) - (^C to abort)"
}
echo "Info: Checking for prerequisites and creating folders..."
echo "To mount your USB do:"
echo "mount -o bind /mnt/your_mount_point /opt"
echo " "
echo "Please only continue if you have your usb mounted on /opt"
confirm
if [ -d /opt ]
then
echo "Folder /opt exists"
else
echo "No Folder /opt exists!"
fi
for folder in bin etc include lib sbin share tmp usr var
do
if [ -d "/opt/$folder" ]
then
echo "Warning: Folder /opt/$folder exists!"
echo "Warning: If something goes wrong please clean /opt folder and try again."
else
mkdir /opt/$folder
fi
done
[ -d "/opt/lib/opkg" ] || mkdir -p /opt/lib/opkg
[ -d "/opt/var/lock" ] || mkdir -p /opt/var/lock
[ -d "/opt/var/log" ] || mkdir -p /opt/var/log
[ -d "/opt/var/run" ] || mkdir -p /opt/var/run
echo "Info: Opkg package manager deployment..."
cd /opt/bin
wget http://qnapware.zyxmon.org/binaries-armv7/installer/opkg
chmod +x /opt/bin/opkg
cd /opt/etc
wget http://qnapware.zyxmon.org/binaries-armv7/installer/opkg.conf
cd /opt/lib
wget http://qnapware.zyxmon.org/binaries-armv7/installer/ld-2.20.so
chmod +x ld-2.20.so
ln -s ld-2.20.so ld-linux.so.3
wget http://qnapware.zyxmon.org/binaries-armv7/installer/libc-2.20.so
ln -s libc-2.20.so libc.so.6
echo "Info: Basic packages installation..."
/opt/bin/opkg update
/opt/bin/opkg install glibc-opt
if [ ! -f /opt/usr/lib/locale/locale-archive ]
then
wget http://qnapware.zyxmon.org/binaries-armv7/installer/locale-archive -O /opt/usr/lib/locale/locale-archive
fi
echo "Info: Congratulations!"
echo "Info: If there are no errors above then Entware.arm successfully initialized."
echo "Info: Add /opt/bin & /opt/sbin to your PATH variable"
echo "Info: Add '/opt/etc/init.d/rc.unslung start' to startup script for Entware.arm services to start"
echo "Info: Found a Bug? Please report at https://github.com/zyxmon/entware-arm/issues"