Permalink
Browse files

Add option to disable self-updating

  • Loading branch information...
1 parent 4c69022 commit 1361c8fc2993e4bcc656bc3a6e86dc1f172eed29 @nylen nylen committed Oct 24, 2012
Showing with 12 additions and 4 deletions.
  1. +7 −0 README.md
  2. +5 −4 rpi-update
View
@@ -50,6 +50,13 @@ To upgrade/downgrade to a specific firmware revision, specify its Git hash
There are a number of options for experts you might like to use. These are all
environment variables you must set if you wish to use them.
+#### `UPDATE_SELF`
+
+By default, `rpi-update` will attempt to update itself each time it is run.
+You can disable this behavior by:
+
+ UPDATE_SELF=0 sudo rpi-update
+
#### `SKIP_KERNEL`
SKIP_KERNEL=1 sudo rpi-update
View
@@ -5,7 +5,7 @@ set -o errexit
REPO_URI="http://github.com/Hexxeh/rpi-firmware"
-UPDATE2=${UPDATE2:-1}
+UPDATE_SELF=${UPDATE_SELF:-1}
UPDATE_URI="https://github.com/Hexxeh/rpi-update/raw/master/rpi-update"
if [[ ${BOOT_PATH:-"unset"} == "unset" && ${ROOT_PATH:-"unset"} != "unset" ]] ||
@@ -44,7 +44,7 @@ function update_self() {
#!/bin/bash
if mv "${_tempFileName}" "$0"; then
rm -- "\$0"
- exec env UPDATE2=0 /bin/bash "$0" "${FW_REV}"
+ exec env UPDATE_SELF=0 /bin/bash "$0" "${FW_REV}"
else
echo "Failed!"
fi
@@ -166,8 +166,9 @@ if [[ ${EUID} -ne 0 ]]; then
exit 1
fi
-if [[ ${UPDATE2} -ne 0 ]]; then
- echo "Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS"
+echo "Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS"
+
+if [[ ${UPDATE_SELF} -ne 0 ]]; then
update_self
fi

0 comments on commit 1361c8f

Please sign in to comment.