Entware Installation on DD-WRT: Difference between revisions
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
*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 after a reboot. Simply 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 "profile" variable (DD-WRT default path: /etc/profile). | *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 after a reboot. Simply 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 "profile" variable (DD-WRT default path: /etc/profile). | ||
*Solution for the above mentioned problem? Create a file in the /opt Directory named ModifiedProfile (or anything you want) using VI (and copy and paste the below code) or copy an existing script file, then edit the contents (erase original contents and paste the below code) and save it. I share the /opt directory, access it via Windows, and edit it with TextPad. But do NOT create a script file via a Windows share (see Other Thoughts below), because it won't work with BASH.<syntaxhighlight> | *Solution for the above mentioned problem? Create a file in the /opt Directory named ModifiedProfile (or anything you want) using VI (and copy and paste the below code) or copy an existing script file, then edit the contents (erase original contents and paste the below code) and save it. I share the /opt directory, access it via Windows, and edit it with TextPad. But do NOT create a script file via a Windows share (see Other Thoughts below), because it won't work with BASH. | ||
<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 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=/lib:/usr/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib | export LD_LIBRARY_PATH=/lib:/usr/lib:/jffs/lib:/jffs/usr/lib:/jffs/usr/local/lib:/mmc/lib:/mmc/usr/lib:/opt/lib:/opt/usr/lib | ||
Line 55: | Line 56: | ||
} | } | ||
</syntaxhighlight> | |||
*Next, save the following as a StartUp Script;<syntaxhighlight> | *Next, save the following as a StartUp Script;<syntaxhighlight> | ||
<syntaxhighlight> | |||
mount -o bind /opt/ModifiedProfile /etc/profile | mount -o bind /opt/ModifiedProfile /etc/profile | ||
sleep 1 | sleep 1 | ||
/opt/etc/profile | /opt/etc/profile | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*I know I | *I know I said I wouldn't explain things in | ||
===OpenWRT Choice=== | ===OpenWRT Choice=== |