Browse Source

Added locking

Dmitry Yu Okunev 7 years ago
parent
commit
008e7030b9
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ipw

+ 3 - 0
ipw

@@ -22,6 +22,9 @@ DEFAULT_BONDING_MODE='balance-tlb'
 
 modprobe bonding
 
+trap 'lockfile-remove /run/ipw' SIGINT SIGTERM SIGHUP SIGQUIT SIGALRM SIGILL SIGABRT SIGPIPE EXIT
+lockfile-create /run/ipw || exit
+
 eerror() {
 	echo "$@" >&2
 }