User Tools

Site Tools


upgrade_config

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 <shell>

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

to

<shell>

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

The only difference is -n

upgrade_config.txt · Last modified: 2013/05/21 16:07 by eric