aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/files
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-22 15:27:34 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-22 15:27:34 +0200
commite3cc4c31bd41b5a2d4b3d5f4e1ecc27b541540c4 (patch)
treeaf9ab46aec39677fc3f1f0ce99ee2c69fb1c5754 /modules/base_installation/files
parentbdcfd78f03d54b20c25805b24b0443f2a107e72b (diff)
downloadPuppet-e3cc4c31bd41b5a2d4b3d5f4e1ecc27b541540c4.tar.gz
Puppet-e3cc4c31bd41b5a2d4b3d5f4e1ecc27b541540c4.tar.zst
Puppet-e3cc4c31bd41b5a2d4b3d5f4e1ecc27b541540c4.zip
Add a way to lock puppet
Diffstat (limited to 'modules/base_installation/files')
-rw-r--r--modules/base_installation/files/scripts/puppet_lock16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/base_installation/files/scripts/puppet_lock b/modules/base_installation/files/scripts/puppet_lock
new file mode 100644
index 0000000..cf5c429
--- /dev/null
+++ b/modules/base_installation/files/scripts/puppet_lock
@@ -0,0 +1,16 @@
1#!/bin/bash
2
3lockfile=/var/run/puppet-apply.lock
4path=`dirname $0`
5path=`cd $path/..; pwd`
6
7if [ $(id -u) -gt 0 ]; then
8 echo "You must be root to run this script." >&2
9 exit 2
10fi
11
12if [ "$1" = "off" ]; then
13 rm -f "$lockfile"
14else
15 touch "$lockfile"
16fi