summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-03-23 20:41:44 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-03-23 20:41:44 -0300
commitfa1f4e0631014a01eaf213f6dd648e98ee51b341 (patch)
tree4584dd2bddc962e82a2756be944e10535dbbbb47
parent5b914fa948ccbdc6b10cc9f6c559f68dfb5f2be8 (diff)
downloadpuppet-apcupsd-fa1f4e0631014a01eaf213f6dd648e98ee51b341.tar.gz
puppet-apcupsd-fa1f4e0631014a01eaf213f6dd648e98ee51b341.tar.bz2
Fix deprecation warnings
-rw-r--r--templates/apcupsd.conf.erb18
-rw-r--r--templates/changeme.erb4
2 files changed, 11 insertions, 11 deletions
diff --git a/templates/apcupsd.conf.erb b/templates/apcupsd.conf.erb
index 6f96775..01225f4 100644
--- a/templates/apcupsd.conf.erb
+++ b/templates/apcupsd.conf.erb
@@ -12,7 +12,7 @@
# Use this to give your UPS a name in log files and such. This
# is particulary useful if you have multiple UPSes. This does not
# set the EEPROM. It should be 8 characters or less.
-UPSNAME <%= name %>
+UPSNAME <%= @name %>
# UPSCABLE <cable>
# Defines the type of cable connecting the UPS to your computer.
@@ -26,7 +26,7 @@ UPSNAME <%= name %>
# 940-1524C, 940-0024G, 940-0095A, 940-0095B,
# 940-0095C, M-04-02-2000
#
-UPSCABLE <%= cable %>
+UPSCABLE <%= @cable %>
# To get apcupsd to work, in addition to defining the cable
# above, you must also define a UPSTYPE, which corresponds to
@@ -72,8 +72,8 @@ UPSCABLE <%= cable %>
# credentials for which the card has been
# configured.
#
-UPSTYPE <%= upstype %>
-DEVICE <%= device %>
+UPSTYPE <%= @upstype %>
+DEVICE <%= @device %>
# POLLTIME <int>
# Interval (in seconds) at which apcupsd polls the UPS for status. This
@@ -82,7 +82,7 @@ DEVICE <%= device %>
# will improve apcupsd's responsiveness to certain events at the cost of
# higher CPU utilization. The default of 60 is appropriate for most
# situations.
-POLLTIME <%= polltime %>
+POLLTIME <%= @polltime %>
# LOCKFILE <path to lockfile>
# Path for device lock file. Not used on Win32.
@@ -118,7 +118,7 @@ NOLOGINDIR /etc
# ONBATTERYDELAY time. If you don't want to be annoyed by short
# powerfailures, make sure that apccontrol powerout does nothing
# i.e. comment out the wall.
-ONBATTERYDELAY <%= onbatterydelay %>
+ONBATTERYDELAY <%= @onbatterydelay %>
#
# Note: BATTERYLEVEL, MINUTES, and TIMEOUT work in conjunction, so
@@ -128,12 +128,12 @@ ONBATTERYDELAY <%= onbatterydelay %>
# If during a power failure, the remaining battery percentage
# (as reported by the UPS) is below or equal to BATTERYLEVEL,
# apcupsd will initiate a system shutdown.
-BATTERYLEVEL <%= batterylevel %>
+BATTERYLEVEL <%= @batterylevel %>
# If during a power failure, the remaining runtime in minutes
# (as calculated internally by the UPS) is below or equal to MINUTES,
# apcupsd, will initiate a system shutdown.
-MINUTES <%= minutes %>
+MINUTES <%= @minutes %>
# If during a power failure, the UPS has run on batteries for TIMEOUT
# many seconds or longer, apcupsd will initiate a system shutdown.
@@ -188,7 +188,7 @@ NETSERVER on
# NIS will listen for connections only on that interface. Use the
# loopback address (127.0.0.1) to accept connections only from the
# local machine.
-NISIP <%= nisip %>
+NISIP <%= @nisip %>
# NISPORT <port> default is 3551 as registered with the IANA
# port to use for sending STATUS and EVENTS data over the network.
diff --git a/templates/changeme.erb b/templates/changeme.erb
index 13cc553..0daa822 100644
--- a/templates/changeme.erb
+++ b/templates/changeme.erb
@@ -9,8 +9,8 @@
# detects that the battery should be replaced.
# We send an email message to root to notify him.
#
-SYSADMIN=<%= admin %>
-APCUPSD_MAIL=<%= mail %>
+SYSADMIN=<%= @admin %>
+APCUPSD_MAIL=<%= @mail %>
HOSTNAME=`hostname`
MSG="$HOSTNAME UPS battery needs changing NOW."