diff mbox series

[OpenWrt-Devel] octeon: Allow sysupgrade restore on ER

Message ID 712ccdda-c064-e78a-6679-058c5b23bf98@navigue.com
State Superseded
Headers show
Series [OpenWrt-Devel] octeon: Allow sysupgrade restore on ER | expand

Commit Message

Jonathan Thibault Nov. 12, 2018, 3:56 p.m. UTC
This is a very simple patch that completes sysupgrade functionality on 
UBNT ER8.

Default layout leaves about 128MB free on the kernel partition so there 
is plenty of space for temporary config backups.

Comments

Stijn Tintel Nov. 12, 2018, 8:45 p.m. UTC | #1
On 12/11/18 17:56, Jonathan Thibault wrote:
> This is a very simple patch that completes sysupgrade functionality on
> UBNT ER8.
>
> Default layout leaves about 128MB free on the kernel partition so
> there is plenty of space for temporary config backups.
>
>
> diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config
> b/target/linux/octeon/base-files/lib/preinit/79_move_config
> index ec63d9f5ff..d50bac081b 100644
> --- a/target/linux/octeon/base-files/lib/preinit/79_move_config
> +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
> @@ -10,6 +10,11 @@ move_config() {
>                         [ -f /mnt/sysupgrade.tgz ] && mv -f
> /mnt/sysupgrade.tgz /
>                         umount /mnt
>                         ;;
> +               er)
> +                       mount -t vfat /dev/mmcblk0p1 /mnt
> +                       [ -f /mnt/sysupgrade.tgz ] && mv -f
> /mnt/sysupgrade.tgz /
> +                       umount /mnt
> +                       ;;
Please order the options alphabetically.
>         esac
>  }
>
> diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh
> b/target/linux/octeon/base-files/lib/upgrade/platform.sh
> index cd49c0da36..2a2136f196 100755
> --- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
> @@ -28,6 +28,11 @@ platform_copy_config() {
>                 cp -af "$CONF_TAR" /mnt/
>                 umount /mnt
>                 ;;
> +       er)
> +               mount -t vfat /dev/mmcblk0p1 /mnt
> +               cp -af "$CONF_TAR" /mnt/
> +               umount /mnt
> +               ;;
Same here.
>         esac
>  }
>
Thanks,
Stijn
Jonathan Thibault Nov. 13, 2018, 2:41 p.m. UTC | #2
On 12/11/18 03:45 PM, Stijn Tintel wrote:
> On 12/11/18 17:56, Jonathan Thibault wrote:
>> This is a very simple patch that completes sysupgrade functionality on
>> UBNT ER8.
>>
>> Default layout leaves about 128MB free on the kernel partition so
>> there is plenty of space for temporary config backups.
>>
>>
>> diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config
>> b/target/linux/octeon/base-files/lib/preinit/79_move_config
>> index ec63d9f5ff..d50bac081b 100644
>> --- a/target/linux/octeon/base-files/lib/preinit/79_move_config
>> +++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
>> @@ -10,6 +10,11 @@ move_config() {
>>                          [ -f /mnt/sysupgrade.tgz ] && mv -f
>> /mnt/sysupgrade.tgz /
>>                          umount /mnt
>>                          ;;
>> +               er)
>> +                       mount -t vfat /dev/mmcblk0p1 /mnt
>> +                       [ -f /mnt/sysupgrade.tgz ] && mv -f
>> /mnt/sysupgrade.tgz /
>> +                       umount /mnt
>> +                       ;;
> Please order the options alphabetically.
>>          esac
>>   }
>>
>> diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh
>> b/target/linux/octeon/base-files/lib/upgrade/platform.sh
>> index cd49c0da36..2a2136f196 100755
>> --- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
>> @@ -28,6 +28,11 @@ platform_copy_config() {
>>                  cp -af "$CONF_TAR" /mnt/
>>                  umount /mnt
>>                  ;;
>> +       er)
>> +               mount -t vfat /dev/mmcblk0p1 /mnt
>> +               cp -af "$CONF_TAR" /mnt/
>> +               umount /mnt
>> +               ;;
> Same here.
>>          esac
>>   }
>>
> Thanks,
> Stijn
>
No problem.  I actually matched the order that was already in the file 
but I'll fix that as well and resubmit.
diff mbox series

Patch

diff --git a/target/linux/octeon/base-files/lib/preinit/79_move_config 
b/target/linux/octeon/base-files/lib/preinit/79_move_config
index ec63d9f5ff..d50bac081b 100644
--- a/target/linux/octeon/base-files/lib/preinit/79_move_config
+++ b/target/linux/octeon/base-files/lib/preinit/79_move_config
@@ -10,6 +10,11 @@  move_config() {
                         [ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /
                         umount /mnt
                         ;;
+               er)
+                       mount -t vfat /dev/mmcblk0p1 /mnt
+                       [ -f /mnt/sysupgrade.tgz ] && mv -f 
/mnt/sysupgrade.tgz /
+                       umount /mnt
+                       ;;
         esac
  }

diff --git a/target/linux/octeon/base-files/lib/upgrade/platform.sh 
b/target/linux/octeon/base-files/lib/upgrade/platform.sh
index cd49c0da36..2a2136f196 100755
--- a/target/linux/octeon/base-files/lib/upgrade/platform.sh
+++ b/target/linux/octeon/base-files/lib/upgrade/platform.sh
@@ -28,6 +28,11 @@  platform_copy_config() {
                 cp -af "$CONF_TAR" /mnt/
                 umount /mnt
                 ;;
+       er)
+               mount -t vfat /dev/mmcblk0p1 /mnt
+               cp -af "$CONF_TAR" /mnt/
+               umount /mnt
+               ;;
         esac
  }