Entware Installation on DD-WRT: Difference between revisions
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
*Run the script: ./generic.sh (it should download all of the necessary files and install it in the /opt directory (which is your disk or flash drive). Be patient as it might take a couple of minutes, depending on your router's CPU speed, to unpack everything and install it. | *Run the script: ./generic.sh (it should download all of the necessary files and install it in the /opt directory (which is your disk or flash drive). Be patient as it might take a couple of minutes, depending on your router's CPU speed, to unpack everything and install it. | ||
*And now it works. NOT! One of the final output lines of the installation script says something like "Congratulations...", but before that is are a couple of lines about changing or adding to the $PATH variable. If you check the $PATH variable after installation it will show that the "/opt paths" where Entware is installed are in the path. But there's a problem. They're at the end of the path which means any binaries or programs that are included with the DD-WRT firmware will be used before the Entware versions. The result is that stuff just doesn't work from the command line properly. Even changing the $PATH variable with: export PATH=/opt/bin:/opt/sbin:/opt/usr/sbin:/opt/usr/bin will not help the situation. Setting the $PATH variable in a startup script via the GUI won't help either in terms of issuing Entware commands at the command line. WTF!? It has to do with the versions of BASH and BusyBox (Google them) running when one connects into a router via the command line. | *And now it works. NOT! One of the final output lines of the installation script says something like "Congratulations...", but before that is are a couple of lines about changing or adding to the $PATH variable. If you check the $PATH variable after installation it will show that the "/opt paths" where Entware is installed are in the path. But there's a problem. They're at the end of the path which means any binaries or programs that are included with the DD-WRT firmware will be used before the Entware versions. The result is that stuff just doesn't work from the command line properly. Even changing the $PATH variable with: export PATH=/opt/bin:/opt/sbin:/opt/usr/sbin:/opt/usr/bin will not help the situation. Setting the $PATH variable in a startup script via the GUI won't help either in terms of issuing Entware commands at the command line. WTF!? It has to do with the versions of BASH and BusyBox (Google them) running when one connects into a router via the command line. | ||
*Solution for the above mentioned problem? | *Solution for the above mentioned problem? Create a file in the /opt Directory named ModifiedProfile (or anything you want) and save the following in the file (HINT: I share the /opt directory, access it via Windows, and edit it with TextPad);<syntaxhighlight> | ||
export PATH=/opt/bin:/opt/sbin:/opt/usr/sbin:/opt/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin:/jffs/sbin:/jffs/bin:/jffs/usr/sbin:/jffs/usr/bin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin | |||
export LD_LIBRARY_PATH=/opt/lib:/opt/usr/lib:/lib:/usr/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib | |||
export PS1='\u@\h:\w\$ ' | |||
reboot() { | |||
=== OpenWRT Choice === | for f in /opt/etc/init.d/K* ; do | ||
[ -x "$f" ] && "$f" stop | |||
done | |||
echo "#!/bin/sh" > /tmp/.rc_shutdown | |||
echo "$(nvram get rc_shutdown)" >> /tmp/.rc_shutdown | |||
if [ -f /tmp/.rc_shutdown ]; then | |||
chmod +x /tmp/.rc_shutdown | |||
/tmp/.rc_shutdown | |||
fi | |||
/sbin/reboot | |||
} | |||
service() { | |||
[ -f "/opt/etc/init.d/$1" ] || { | |||
echo "service "'"'"$1"'"'" not found, the following services are available:" | |||
ls "/opt/etc/init.d" | |||
return 1 | |||
} | |||
/opt/etc/init.d/$@ | |||
} | |||
</syntaxhighlight><br /> | |||
* Next, save the following as a StartUp Script;<syntaxhighlight> | |||
mount -o bind /opt/ModifiedProfile /etc/profile | |||
sleep 1 | |||
/opt/etc/profile | |||
</syntaxhighlight>I know I said I wouldn't explain things in | |||
* I know I promised | |||
===OpenWRT Choice=== | |||
Of course you could always install OpenWRT instead of DD-WRT and none of the above is necessary. But that opens a whole new can of worms with different problems. For instance, installing the latest (as of 1.2020) version of OpenWRT on a Linksys WRT3200ACM router, which is at the very top end of DD-WRT / OpenWRT hardware, there is no facility within the GUI as it is initially installed to mount, share, or do anything with a USB or eSATA drive. All of that functionality, which has to be added to OpenWRT via a command line is available from DD-WRT right out of the box. Once you know what you're doing, both firmware choices are equally configurable, in an equally easy fashion, in their own unique ways, each with their own advantages and disadvantages. Apples and Oranges. Your choice. | Of course you could always install OpenWRT instead of DD-WRT and none of the above is necessary. But that opens a whole new can of worms with different problems. For instance, installing the latest (as of 1.2020) version of OpenWRT on a Linksys WRT3200ACM router, which is at the very top end of DD-WRT / OpenWRT hardware, there is no facility within the GUI as it is initially installed to mount, share, or do anything with a USB or eSATA drive. All of that functionality, which has to be added to OpenWRT via a command line is available from DD-WRT right out of the box. Once you know what you're doing, both firmware choices are equally configurable, in an equally easy fashion, in their own unique ways, each with their own advantages and disadvantages. Apples and Oranges. Your choice. | ||
<br /> | <br /> |