mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-05-04 17:36:12 +02:00
treewide: use -n for fw_[saveprint]env
Using awk and cut to simulate -n is pointless. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22806 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
56be1d1530
commit
a031f16348
@ -12,8 +12,7 @@ boot() {
|
||||
fw_setenv fwr_verify 0
|
||||
;;
|
||||
qihoo,c301)
|
||||
local n=$(fw_printenv activeregion | cut -d = -f 2)
|
||||
fw_setenv "image${n}trynum" 0
|
||||
fw_setenv $(printf "image%strynum" $(fw_printenv -n activeregion)) 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -97,11 +97,9 @@ define Device/kernel-size-migration-linksys
|
||||
2. Run folowing commands in console (ssh or serial): \n$\
|
||||
\t fw_printenv \n$\
|
||||
\t fw_setenv nandboot \
|
||||
"$$$$(fw_printenv nandboot | awk -F= '{sub(/^nandboot=/, "");print}' \
|
||||
| sed 's/0x300000/0x400000/g')"\n$\
|
||||
"$$$$(fw_printenv -n nandboot | sed 's/0x300000/0x400000/g')"\n$\
|
||||
\t fw_setenv altnandboot \
|
||||
"$$$$(fw_printenv altnandboot | awk -F= '{sub(/^altnandboot=/, "");print}' \
|
||||
| sed 's/0x300000/0x400000/g')"\n$\
|
||||
"$$$$(fw_printenv -n altnandboot | sed 's/0x300000/0x400000/g')"\n$\
|
||||
3. Test if envs are ok by 'fw_printenv'. \
|
||||
It should be the same except last argument of\
|
||||
'nand read.e' in 'nandboot' and 'altnandboot'.\n$\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user