Revert "sysupgrade: run only one instance at a time."
authorJo-Philipp Wich <jo@mein.io>
Fri, 26 May 2017 12:48:05 +0000 (14:48 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 26 May 2017 12:49:08 +0000 (14:49 +0200)
This reverts commit e96a9a9af82c00dcce606a84a7bb87a00411385d.

The change breaks sysupgrade through LuCI and two-stage sysupgrade on
NAND targets. There is also a mismatch of file paths in lock and unlock
operations.

This commit was apparently neither properly tested, nor reviewed, so
drop it for now.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/base-files/files/sbin/sysupgrade

index 1eede14b05d2409308d47bb9304219de84ec0808..c095ca81c50c71021af2dc04a561ac22f6b7442b 100755 (executable)
@@ -47,20 +47,6 @@ while [ -n "$1" ]; do
        shift;
 done
 
-# just one instance
-if  ! lock -n /tmp/sysupgrade.lock
-then
-       echo "Another instance of sysupgrade already running"
-       echo "If you are sure this is wrong remove file /tmp/sysupgrade.lock"
-       exit 1
-fi
-
-# make sure the lock is removed when done even when killed
-finish() {
-       lock -u /var/sysupgrade.lock
-}
-trap finish EXIT INT TERM
-
 export CONFFILES=/tmp/sysupgrade.conffiles
 export CONF_TAR=/tmp/sysupgrade.tgz