* Sun Oct 05 2025 Brian Read <brianr@koozali.org> 2.0.4-27.sme
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
This commit is contained in:
@@ -35,14 +35,14 @@ use SrvMngr qw(theme_list init_session);
|
|||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use esmith::util;
|
use esmith::util;
|
||||||
use esmith::HostsDB;
|
use esmith::HostsDB::UTF8;
|
||||||
use esmith::AccountsDB;
|
use esmith::AccountsDB::UTF8;
|
||||||
use Net::Ping;
|
use Net::Ping;
|
||||||
use esmith::util::network qw(:all);
|
use esmith::util::network qw(:all);
|
||||||
use Socket qw( inet_aton );
|
use Socket qw( inet_aton );
|
||||||
|
|
||||||
|
|
||||||
#our $adb = esmith::AccountsDB->open() or die("Unable to open accounts DB");
|
#our $adb = esmith::AccountsDB::UTF8->open() or die("Unable to open accounts DB");
|
||||||
|
|
||||||
my %dhcp_data = ();
|
my %dhcp_data = ();
|
||||||
|
|
||||||
@@ -56,6 +56,9 @@ sub main {
|
|||||||
do_display($c);
|
do_display($c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $db;
|
||||||
|
|
||||||
|
|
||||||
sub do_display {
|
sub do_display {
|
||||||
#
|
#
|
||||||
# Front parameters page
|
# Front parameters page
|
||||||
@@ -65,7 +68,7 @@ sub do_display {
|
|||||||
my $title = $c->l("dhcpd_DHCP manager");
|
my $title = $c->l("dhcpd_DHCP manager");
|
||||||
my $modul = '';
|
my $modul = '';
|
||||||
my $trt = "SETTINGS";
|
my $trt = "SETTINGS";
|
||||||
our $db = esmith::ConfigDB->open() or die("Unable to open Configuration DB");
|
$db = esmith::ConfigDB::UTF8->open() or die("Unable to open Configuration DB");
|
||||||
our %sme_conf = $db->get('dhcpd')->props;
|
our %sme_conf = $db->get('dhcpd')->props;
|
||||||
our %smb_conf = $db->get('smb')->props;
|
our %smb_conf = $db->get('smb')->props;
|
||||||
$dhcp_data{trt} = $trt;
|
$dhcp_data{trt} = $trt;
|
||||||
@@ -175,7 +178,7 @@ sub do_update_check {
|
|||||||
my $c = shift;
|
my $c = shift;
|
||||||
my $dhcpd_check = $c->param ('dhcp_check');
|
my $dhcpd_check = $c->param ('dhcp_check');
|
||||||
###Update SME configuration dbase
|
###Update SME configuration dbase
|
||||||
my $dbh_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration');
|
my $dbh_sme = esmith::ConfigDB::UTF8->open('/home/e-smith/db/configuration');
|
||||||
##Initiate get method --> create record object
|
##Initiate get method --> create record object
|
||||||
my $sme_record = $dbh_sme->get('dhcpd');
|
my $sme_record = $dbh_sme->get('dhcpd');
|
||||||
$sme_record->set_prop('check' , $dhcpd_check);
|
$sme_record->set_prop('check' , $dhcpd_check);
|
||||||
@@ -205,7 +208,7 @@ sub Main_Save ($){
|
|||||||
my $dhcpd_gateway = $q->param ('dhcp_gateway');
|
my $dhcpd_gateway = $q->param ('dhcp_gateway');
|
||||||
|
|
||||||
###Update SME configuration dbase
|
###Update SME configuration dbase
|
||||||
my $dbh_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration');
|
my $dbh_sme = esmith::ConfigDB::UTF8->open('/home/e-smith/db/configuration');
|
||||||
|
|
||||||
##Initiate get method --> create record object
|
##Initiate get method --> create record object
|
||||||
my $sme_record = $dbh_sme->get('dhcpd');
|
my $sme_record = $dbh_sme->get('dhcpd');
|
||||||
@@ -536,7 +539,7 @@ sub get_mac_address_by_ping {
|
|||||||
|
|
||||||
sub Scan_Local_Network ($) {
|
sub Scan_Local_Network ($) {
|
||||||
|
|
||||||
my $nmap_sme = esmith::ConfigDB->open('/home/e-smith/db/configuration');
|
my $nmap_sme = esmith::ConfigDB::UTF8->open('/home/e-smith/db/configuration');
|
||||||
my $mask = $nmap_sme->get_value('LocalNetmask');
|
my $mask = $nmap_sme->get_value('LocalNetmask');
|
||||||
my $network = $nmap_sme->get_prop('InternalInterface','Network');
|
my $network = $nmap_sme->get_prop('InternalInterface','Network');
|
||||||
|
|
||||||
@@ -580,7 +583,7 @@ sub Load_leases ($){
|
|||||||
@detail $work_line $header /;
|
@detail $work_line $header /;
|
||||||
my $name_file = '/var/lib/dhcpd/dhcpd.leases' ;
|
my $name_file = '/var/lib/dhcpd/dhcpd.leases' ;
|
||||||
our @liste_computer = '' ;
|
our @liste_computer = '' ;
|
||||||
our $db = esmith::ConfigDB->open() or die("Unable to open Configuration DB");
|
our $db = esmith::ConfigDB::UTF8->open() or die("Unable to open Configuration DB");
|
||||||
our %sme_conf = $db->get('dhcpd')->props;
|
our %sme_conf = $db->get('dhcpd')->props;
|
||||||
#Ouverture du fichier en lecture seule
|
#Ouverture du fichier en lecture seule
|
||||||
open(FILE,"<$name_file") || die "Read error $name_file, Error: $!" ;
|
open(FILE,"<$name_file") || die "Read error $name_file, Error: $!" ;
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
%define name smeserver-dhcpmanager
|
%define name smeserver-dhcpmanager
|
||||||
%define version 2.0.4
|
%define version 2.0.4
|
||||||
%define release 26
|
%define release 27
|
||||||
|
|
||||||
Summary: provide a dhcp panel in the server-manager for The SME Server
|
Summary: provide a dhcp panel in the server-manager for The SME Server
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
@@ -25,6 +25,9 @@ AutoReqProv: no
|
|||||||
Implementation of some feature arround dhcp clients like : wol, cleaning dhcpd.leases, Scan of your network etc//
|
Implementation of some feature arround dhcp clients like : wol, cleaning dhcpd.leases, Scan of your network etc//
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Oct 05 2025 Brian Read <brianr@koozali.org> 2.0.4-27.sme
|
||||||
|
- Add UTF8 and avoid potential DB caching problems [SME: 13209]
|
||||||
|
|
||||||
* Sat Oct 04 2025 Brian Read <brianr@koozali.org> 2.0.4-26.sme
|
* Sat Oct 04 2025 Brian Read <brianr@koozali.org> 2.0.4-26.sme
|
||||||
- Delete en.pm and create .lex file if needed [SME: 13214]
|
- Delete en.pm and create .lex file if needed [SME: 13214]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user