aboutsummaryrefslogtreecommitdiff
path: root/modules/base_installation/files/scripts/puppet_lock
blob: cf5c4293e4a330a2fb2388952339d7640b8a372b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

lockfile=/var/run/puppet-apply.lock
path=`dirname $0`
path=`cd $path/..; pwd`

if [ $(id -u) -gt 0 ]; then
  echo "You must be root to run this script." >&2
  exit 2
fi

if [ "$1" = "off" ]; then
  rm -f "$lockfile"
else
  touch "$lockfile"
fi