How-to Keep Router Configuration after an Upgrade

Question

Is there any reason why it is not possible for Gargoyle to remember its configuration after an upgrade? It is possible on almost all firmware (including openwrt). This would make the upgrade process so much more pleasant.

Answer

Yes. This is what the checkbox in Gargoyle 1.5.3+ does, however there will be incompatibilities when there are major changes between versions. For example, when upgrading from OpenWrt “Backfire” based Gargoyle (Gargoyle 1.5.6 and before) to OpenWrt “Attitude Adjustment” based Gargoyle (Gargoyle 1.5.7 and later), attempting to preserve settings will brick your router.

In versions of Gargoyle prior to 1.5.3, the solution below will allow this option even though it is not present in the GUI.

Solution

SSH into your router and edit the file /www/utility/do_upgrade.sh

On line 47

change

      /sbin/sysupgrade -n /tmp/up/upgrade  2>&1 | awk ' $0 ~ /eboot/ { print "<script type=\"text/javascript\">top.upgraded();</script></body></html>" ; } '
      

to

      /sbin/sysupgrade /tmp/up/upgrade  2>&1 | awk ' $0 ~ /eboot/ { print "<script type=\"text/javascript\">top.upgraded();</script></body></html>" ; } '
      

The only difference is -n

upgrade_config.txt · Last modified: 2013/05/21 16:07 by eric
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki