Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
Freifunk Franken Firmware
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
freifunk
Freifunk Franken Firmware
Commits
2752dd97
Commit
2752dd97
authored
10 years ago
by
Oliver Voelker
Browse files
Options
Downloads
Patches
Plain Diff
neues Script fuer komfortablere Firmwareupgrades.
Auszufuehren ueber: /etc/sysupgrade.sh
parent
23161285
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bsp/default/root_file_system/etc/sysupgrade.sh
+27
-0
27 additions, 0 deletions
bsp/default/root_file_system/etc/sysupgrade.sh
with
27 additions
and
0 deletions
bsp/default/root_file_system/etc/sysupgrade.sh
0 → 100755
+
27
−
0
View file @
2752dd97
#!/bin/sh
BOARD
=
`
uci get board.model.name
`
FILE
=
"openwrt-ar71xx-generic-
$BOARD
-squashfs-sysupgrade.bin"
echo
-ne
"
\n
Hardware:
$BOARD
\n
"
echo
-ne
"Downloading
$FILE
\n\n
"
cd
/tmp/
wget http://
$(
uci get configurator.@api[0].ipv6_address
)
%
$(
uci get configurator.@api[0].ipv6_interface
)
/dev/firmware/current/
${
FILE
}
wget http://
$(
uci get configurator.@api[0].ipv6_address
)
%
$(
uci get configurator.@api[0].ipv6_interface
)
/dev/firmware/current/
${
FILE
}
.md5
echo
-ne
"
\n
done. Comparing md5 sums: "
md5sum
-c
${
FILE
}
.md5
ret
=
$?
echo
if
[
$ret
-ne
0
]
;
then
echo
-ne
"md5 sums do not match. Try restarting this script to redownload the firmware.
\n\n
"
rm
-f
${
FILE
}*
exit
1
else
while
true
;
do
read
-p
"md5 sums correct. Should I start upgrading the firmware (y/N)? "
yn
case
$yn
in
[
Yy]
)
echo
-ne
"
\n
Starting firmware upgrade. Don't touch me until I reboot.
\n\n\n
"
;
sysupgrade
${
FILE
}
;
break
;;
[
Nn]|
*
)
echo
-ne
"
\n
Aborting firmware upgrade.
\n\n
"
;
rm
-f
${
FILE
}*
;
exit
0
;;
esac
done
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment