autoupdate:

- fix locking
This commit is contained in:
Stephan Raue 2010-05-06 00:25:20 +02:00
parent 96aa512a4d
commit 60910917e4
2 changed files with 6 additions and 10 deletions

View File

@ -6,8 +6,6 @@
if [ ! -f /var/lock/update.lock ]; then
if [ "$AUTOUPDATE" = "manually" -o "$AUTOUPDATE" = "auto" ]; then
# locking autoupdate
touch /var/lock/update.lock
# sleep a bit, maybe we have a lot of work ;-)
usleep 30000000
@ -42,14 +40,14 @@ if [ ! -f /var/lock/update.lock ]; then
# show a message if a new version is avaible
send_message "New update avaible: r$NEW_VERSION - please update manually"
# remove locking
rm -rf /var/lock/update.lock
elif [ "$AUTOUPDATE" = "auto" ]; then
# show a message if a new version is avaible
send_message "New update avaible: r$NEW_VERSION - downloading and extract the new version..."
# locking autoupdate
touch /var/lock/update.lock
# downloading the new version
wget -c $UPDATEURL/$NEW_IMAGE.tar.bz2 -P /tmp

View File

@ -6,8 +6,6 @@
if [ ! -f /var/lock/update.lock ]; then
if [ "$AUTOUPDATE" = "manually" -o "$AUTOUPDATE" = "auto" ]; then
# locking autoupdate
touch /var/lock/update.lock
# sleep a bit, maybe we have a lot of work ;-)
usleep 30000000
@ -49,14 +47,14 @@ if [ ! -f /var/lock/update.lock ]; then
# show a message if a new version is avaible
send_message "New update avaible: $NEW_VERSION - please update manually"
# remove locking
rm -rf /var/lock/update.lock
elif [ "$AUTOUPDATE" = "auto" ]; then
# show a message if a new version is avaible
send_message "New update avaible: $NEW_VERSION - downloading and extract the new version..."
# locking autoupdate
touch /var/lock/update.lock
# downloading the new version
wget -c $UPDATEURL/$NEW_IMAGE.tar.bz2 -P /tmp