Skip to content
Snippets Groups Projects
Commit 87a5035c authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

Ethers hook, compatibility with old lockfile


Remove "-l" option since some ancient systems ship a version of lockfile-progs
not supporting it.

Signed-off-by: default avatarLuca Bigliardi <shammash@google.com>
parent 500a0b29
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ DAEMON_PID_FILE="/var/run/dnsmasq.pid" ...@@ -39,7 +39,7 @@ DAEMON_PID_FILE="/var/run/dnsmasq.pid"
# In order to handle concurrent execution of this lock, we use the $LOCKFILE. # In order to handle concurrent execution of this lock, we use the $LOCKFILE.
# LOCKFILE_CREATE and LOCKFILE_REMOVE are the path names for the lockfile-progs # LOCKFILE_CREATE and LOCKFILE_REMOVE are the path names for the lockfile-progs
# programs which we use as helpers. # programs which we use as helpers.
LOCKFILE="/var/lock/ganeti_ethers.lock" LOCKFILE="/var/lock/ganeti_ethers"
LOCKFILE_CREATE="/usr/bin/lockfile-create" LOCKFILE_CREATE="/usr/bin/lockfile-create"
LOCKFILE_REMOVE="/usr/bin/lockfile-remove" LOCKFILE_REMOVE="/usr/bin/lockfile-remove"
...@@ -50,8 +50,8 @@ instance=$GANETI_INSTANCE_NAME ...@@ -50,8 +50,8 @@ instance=$GANETI_INSTANCE_NAME
nic_count=$GANETI_INSTANCE_NIC_COUNT nic_count=$GANETI_INSTANCE_NIC_COUNT
acquire_lockfile() { acquire_lockfile() {
$LOCKFILE_CREATE -l $LOCKFILE || exit 1 $LOCKFILE_CREATE $LOCKFILE || exit 1
trap "$LOCKFILE_REMOVE -l $LOCKFILE" EXIT trap "$LOCKFILE_REMOVE $LOCKFILE" EXIT
} }
update_ethers_from_new() { update_ethers_from_new() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment