[OpenWrt-Devel] [PATCH 3/3] treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup

Adrian Schmutzler mail at adrianschmutzler.de
Fri Sep 6 09:16:48 EDT 2019


> -----Original Message-----
> From: Rafał Miłecki [mailto:rafal at milecki.pl]
> Sent: Freitag, 6. September 2019 15:13
> To: Adrian Schmutzler <mail at adrianschmutzler.de>
> Cc: 'Rafał Miłecki' <zajec5 at gmail.com>; openwrt-devel at lists.openwrt.org; 'Jonas Gorski' <jonas.gorski at gmail.com>; 'Jo-Philipp Wich'
> <jo at mein.io>; 'John Crispin' <john at phrozen.org>
> Subject: Re: [OpenWrt-Devel] [PATCH 3/3] treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup
> 
> On 2019-09-06 15:05, Adrian Schmutzler wrote:
> >> diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
> >> b/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
> >> index e313562017..8e02186eb8 100644
> >> --- a/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
> >> +++ b/target/linux/ipq40xx/base-files/lib/upgrade/openmesh.sh
> >> @@ -74,7 +74,7 @@ platform_do_upgrade_openmesh() {
> >>  	#
> >>
> >>  	# take care of restoring a saved config
> >> -	[ "$UPGRADE_OPT_SAVE_CONFIG" -eq 1 ] &&
> >> restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
> >> +	[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j
> >> ${UPGRADE_BACKUP}"
> >
> > Any reason for the curly braces here?
> >
> > If not, I'd consider removing them with this patch ...
> 
> I just left existing coding style

I'm aware of that, I just saw that from all changed lines/files this is the only one using the curly braces (without necessity).

However, this was just a suggestion and it is purely cosmetical, so feel free to ignore it :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190906/6278f0b7/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list