mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
sysupgrade: uci wireless santity checks.
This commit is contained in:
parent
61c11e2520
commit
79f7343cb4
1 changed files with 9 additions and 4 deletions
|
|
@ -22,13 +22,18 @@ hasWifi=$(chroot "${2}" db -q get hw.board.hasWifi)
|
||||||
|
|
||||||
|
|
||||||
# Read the very first verion of the wireless settings.
|
# Read the very first verion of the wireless settings.
|
||||||
chroot "${2}" uci -c "/lib/config/snapshots/first_boot/uci" \
|
if ! chroot "${2}" uci -c "/lib/config/snapshots/first_boot/uci" \
|
||||||
show wireless >"/tmp/wireless-first-$$"
|
-q show wireless >"/tmp/wireless-first-$$" || \
|
||||||
|
[ ! -s "/tmp/wireless-first-$$" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Let the current UCI export its wireless settings.
|
# Let the current UCI export its wireless settings.
|
||||||
chroot "${2}" uci show wireless >"/tmp/wireless-current-$$"
|
if ! chroot "${2}" uci -q show wireless >"/tmp/wireless-current-$$" || \
|
||||||
|
[ ! -s "/tmp/wireless-current-$$" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# If there a diff between the two?
|
# If there a diff between the two?
|
||||||
if grep -vFf "/tmp/wireless-first-$$" "/tmp/wireless-current-$$" \
|
if grep -vFf "/tmp/wireless-first-$$" "/tmp/wireless-current-$$" \
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue