diff --git a/createlinks b/createlinks index e8a0bbe..5739148 100644 --- a/createlinks +++ b/createlinks @@ -18,7 +18,7 @@ foreach (qw(bootstrap-console-save console-save smeserver-nutUPS-update nut-conf my $event= "nut-conf"; event_link("nut-config-drivers", $event, "50"); event_link("systemd-default", $event, "88"); -safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-driver\@nut"); +safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-driver\@ups"); safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-monitor"); safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-server"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/masq"); @@ -26,7 +26,7 @@ templates2events("/etc/rc.d/init.d/masq", $event); $event="smeserver-nutUPS-update"; -safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-driver\@nut"); +safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-driver\@ups"); safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-monitor"); safe_symlink("try-restart", "root/etc/e-smith/events/$event/services2adjust/nut-server"); templates2events("/etc/systemd/system-preset/49-koozali.preset", $event); diff --git a/root/etc/e-smith/db/configuration/defaults/nut-driver@UPS/status b/root/etc/e-smith/db/configuration/defaults/nut-driver@ups/status similarity index 100% rename from root/etc/e-smith/db/configuration/defaults/nut-driver@UPS/status rename to root/etc/e-smith/db/configuration/defaults/nut-driver@ups/status diff --git a/root/etc/e-smith/db/configuration/defaults/nut-driver@UPS/type b/root/etc/e-smith/db/configuration/defaults/nut-driver@ups/type similarity index 100% rename from root/etc/e-smith/db/configuration/defaults/nut-driver@UPS/type rename to root/etc/e-smith/db/configuration/defaults/nut-driver@ups/type diff --git a/root/etc/e-smith/events/actions/nut-config-drivers b/root/etc/e-smith/events/actions/nut-config-drivers index 63cf048..8747c88 100644 --- a/root/etc/e-smith/events/actions/nut-config-drivers +++ b/root/etc/e-smith/events/actions/nut-config-drivers @@ -4,7 +4,7 @@ #if MODE = netclient only enable monitor # calling this script to configure unit and drivers -if [[ $(config getprop nut status || echo "disabled") == "disabled" ]] ; then +if [[ $(/sbin/e-smith/config getprop nut status || echo "disabled") == "disabled" ]] ; then # disable server # leave monitor as is, we might want to monitor an external ups ? # get_all_by_prop filter nut-driver@ and foreach $UPS disabled diff --git a/root/usr/share/smanager/lib/SrvMngr/Controller/Nutups-Custom.pm b/root/usr/share/smanager/lib/SrvMngr/Controller/Nutups-Custom.pm index fd75576..0eed910 100644 --- a/root/usr/share/smanager/lib/SrvMngr/Controller/Nutups-Custom.pm +++ b/root/usr/share/smanager/lib/SrvMngr/Controller/Nutups-Custom.pm @@ -159,7 +159,7 @@ my $cdb = esmith::ConfigDB->open() || die("Couldn't open config db"); $cdb = esmith::ConfigDB->open() || die("Couldn't open config db"); my $db = $cdb; #maybe one of the others my $dbkey = 'nut'; - my $driverkey = 'nut-driver@UPS'; + my $driverkey = 'nut-driver@ups'; # To make it write to DB as comment, delete this (regex) string in each if statement "TRUE\) \#copy or perform with value: .* e.g." if (!$db->set_prop($dbkey,'status',$c->param('status'))) diff --git a/root/usr/share/smanager/themes/default/templates/partials/_nut_CONFIG.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_nut_CONFIG.html.ep index 61b7a2c..e6551b5 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_nut_CONFIG.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_nut_CONFIG.html.ep @@ -84,8 +84,8 @@
%=l('nut_SlaveUPS_UPSNAME@IP')
- % param 'SlaveUPS_Name' => $nut_data->{SlaveUPS_Name} unless param 'SlaveUPS_Name';
- %= text_field 'SlaveUPS_Name', size => '50', class => 'textinput SlaveUPS_Name' , pattern=>'.*' , placeholder=>'upsname@IP[:port]'
+ % param 'ClientUPS_Name' => $nut_data->{ClientUPS_Name} unless param 'ClientUPS_Name';
+ %= text_field 'ClientUPS_Name', size => '50', class => 'textinput ClientUPS_Name' , pattern=>'.*' , placeholder=>'upsname@IP[:port]'