From fa1f4e0631014a01eaf213f6dd648e98ee51b341 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 23 Mar 2016 20:41:44 -0300 Subject: Fix deprecation warnings --- templates/apcupsd.conf.erb | 18 +++++++++--------- templates/changeme.erb | 4 ++-- 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 # 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 # 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 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 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." -- cgit v1.2.3