summaryrefslogtreecommitdiff
path: root/bin/puppet_command
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-02-12 15:07:58 -0800
committerelijah <elijah@riseup.net>2016-02-16 11:40:09 -0800
commitd547f9564fb8aae5e2839cfbc5f54a706398a2b0 (patch)
tree9d47bb3e45d1d8553df91767d26c6052ea88bb30 /bin/puppet_command
parentfe312317f6b9ba98a8020a381aa72bfe28bf412f (diff)
require jessie and created note_init script for node initialization
Diffstat (limited to 'bin/puppet_command')
-rwxr-xr-xbin/puppet_command6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/puppet_command b/bin/puppet_command
index 1e74522a..702c8cbd 100755
--- a/bin/puppet_command
+++ b/bin/puppet_command
@@ -13,6 +13,7 @@ require 'logger'
require 'socket'
require 'fileutils'
+DEBIAN_VERSION = /^(jessie|8\.)/
PUPPET_BIN = '/usr/bin/puppet'
PUPPET_DIRECTORY = '/srv/leap'
PUPPET_PARAMETERS = '--color=false --detailed-exitcodes --libdir=puppet/lib --confdir=puppet'
@@ -28,7 +29,12 @@ SUMMARY_LOG_1 = '/var/log/leap/deploy-summary.log.1'
APPLY_START_STR = "STARTING APPLY"
APPLY_FINISH_STR = "APPLY COMPLETE"
+
def main
+ if File.read('/etc/debian_version') !~ DEBIAN_VERSION
+ log "ERROR: This operating system is not supported. The file /etc/debian_version must match #{DEBIAN_VERSION}."
+ exit 1
+ end
process_command_line_arguments
with_lockfile do
@commands.each do |command|