Browse Source

Do not collect ipw instances on lockfile

Dmitry Yu Okunev 7 years ago
parent
commit
6299812d52
1 changed files with 5 additions and 0 deletions
  1. 5 0
      ipw

+ 5 - 0
ipw

@@ -22,6 +22,11 @@ DEFAULT_BONDING_MODE='balance-tlb'
 
 modprobe bonding
 
+if lockfile-check /run/ipw; then
+	eerror 'Another "ipw" instance is already running'
+	exit -1
+fi
+
 trap 'lockfile-remove /run/ipw' SIGINT SIGTERM SIGHUP SIGQUIT SIGALRM SIGILL SIGABRT SIGPIPE EXIT
 lockfile-create /run/ipw || exit