]> gitweb.fluxo.info Git - puppet-apcupsd.git/commitdiff
Fix deprecation warnings
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 23 Mar 2016 23:41:44 +0000 (20:41 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 23 Mar 2016 23:41:44 +0000 (20:41 -0300)
templates/apcupsd.conf.erb
templates/changeme.erb

index 6f967757fd6bb2b3c1161d30bcf979b754c4c1e0..01225f4ada359e4d947e258694cd9ae9cfbe113c 100644 (file)
@@ -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.
index 13cc5536ac935ea774bbe8ec4d33d670abf92e56..0daa8227e182924b332f5ac4957ab92d9a3517e4 100644 (file)
@@ -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."