diff -urN smeserver-manager-0.1.4.old/root/etc/e-smith/templates/etc/rsyslog.conf/32smanager smeserver-manager-0.1.4/root/etc/e-smith/templates/etc/rsyslog.conf/32smanager --- smeserver-manager-0.1.4.old/root/etc/e-smith/templates/etc/rsyslog.conf/32smanager 1970-01-01 01:00:00.000000000 +0100 +++ smeserver-manager-0.1.4/root/etc/e-smith/templates/etc/rsyslog.conf/32smanager 2024-05-01 06:15:24.800916581 +0100 @@ -0,0 +1,4 @@ +#smanager +:programname, isequal, "smanager" /var/log/smanager/smanager.log +& stop + diff -urN smeserver-manager-0.1.4.old/root/etc/logrotate.d/smanager smeserver-manager-0.1.4/root/etc/logrotate.d/smanager --- smeserver-manager-0.1.4.old/root/etc/logrotate.d/smanager 2020-11-19 07:53:26.000000000 +0000 +++ smeserver-manager-0.1.4/root/etc/logrotate.d/smanager 2024-05-01 06:15:24.800916581 +0100 @@ -1,4 +1,6 @@ -/usr/share/smanager/log/production.log { +/var/log/smanager/smanager.log { + su root root + create 600 root root weekly copytruncate rotate 12 diff -urN smeserver-manager-0.1.4.old/root/usr/lib/systemd/system/smanager.service smeserver-manager-0.1.4/root/usr/lib/systemd/system/smanager.service --- smeserver-manager-0.1.4.old/root/usr/lib/systemd/system/smanager.service 2024-06-29 13:13:35.495126742 +0100 +++ smeserver-manager-0.1.4/root/usr/lib/systemd/system/smanager.service 2024-05-01 06:15:24.800916581 +0100 @@ -7,7 +7,7 @@ Type=simple SyslogIdentifier=smanager WorkingDirectory=/usr/share/smanager/script -PIDFile=/var/run/smanager.pid +PIDFile=/run/smanager.pid ExecStartPre=/sbin/e-smith/service-status smanager ExecStart=/usr/bin/hypnotoad srvmngr -f ExecStop=/usr/bin/hypnotoad -s srvmngr diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Backup.pm smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Backup.pm --- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Backup.pm 2024-06-29 13:13:35.597129774 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Backup.pm 2024-04-30 12:35:00.000000000 +0100 @@ -37,6 +37,8 @@ use esmith::util; use esmith::lockfile; +use esmith::BlockDevices; + use constant DEBUG => $ENV{MOJO_SMANAGER_DEBUG} || 0; our $cdb = esmith::ConfigDB->open || die "Couldn't open config db"; @@ -1576,19 +1578,33 @@ my @usbdisks = (); if ( $VFSType eq 'usb' ) { - foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) { - $udi =~ m/^(\S+)/; - - my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted); + my $devices = esmith::BlockDevices->new ('allowmount' => 'disabled'); + my ($valid, $invalid) = $devices->checkBackupDrives(0); - if ($is_mounted eq "false\n") { - my $vollbl = qx(hal-get-property --udi $1 --key volume.label); - $vollbl =~ m/^(\S+)/; - if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';} - chomp $vollbl; - push @usbdisks, $vollbl; + if ( ${$valid}[0] ) { + foreach ( @{$valid} ) { + push @usbdisks, $devices->label($_); } } + + if (!$usbdisks[0]){ + push (@usbdisks,$c->l('bac_No suitable local devices found')); + } + $devices->destroy; + + #foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) { + #$udi =~ m/^(\S+)/; + + #my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted); + + #if ($is_mounted eq "false\n") { + #my $vollbl = qx(hal-get-property --udi $1 --key volume.label); + #$vollbl =~ m/^(\S+)/; + #if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';} + #chomp $vollbl; + #push @usbdisks, $vollbl; + #} + #} # return undef unless ($usbdisks[0]); } @@ -1985,31 +2001,50 @@ return ( qx(/bin/mount -t nfs -o nolock "$host:/$share" $mountdir 2>&1) ); } elsif ($VFSType eq 'usb') { - my $device = ""; - my $blkdev = ""; + my $device = ""; my $vollbl = ""; - foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) { - $udi =~ m/^(\S+)/; - my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted); - - if ($is_mounted eq "false\n") { - $blkdev = qx(hal-get-property --udi $1 --key block.device); - if ($blkdev =~ m/^(\S+)/) {$blkdev = $1;} - } - if ($is_mounted eq "false\n") { - $vollbl = qx(hal-get-property --udi $1 --key volume.label); - $vollbl =~ m/^(\S+)/; - if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';} - } - - chomp $vollbl; - chomp $blkdev; - $vollbl = "media/$vollbl"; - if ($vollbl eq $share) { - $device = $blkdev; - } + + my $devices = esmith::BlockDevices->new ('allowmount' => 'disabled'); + my ($valid, $invalid) = $devices->checkBackupDrives(0); + + if ( ${$valid}[0] ) { + foreach ( @{$valid} ) { + $vollbl = $devices->label($_); + if ( $share eq "media/$vollbl" ) { + $device = "/dev/$_"; + } + } } - return ( qx(/bin/mount $device "/$share" 2>&1) ); + $devices->destroy; + return ( qx (mount $device /$share 2>&1) ); + +#------------------------------------------------------------------------------------------------------- + #my $device = ""; + #my $blkdev = ""; + #my $vollbl = ""; + #foreach my $udi (qx(hal-find-by-property --key volume.fsusage --string filesystem)) { + #$udi =~ m/^(\S+)/; + #my $is_mounted = qx(hal-get-property --udi $1 --key volume.is_mounted); + + #if ($is_mounted eq "false\n") { + #$blkdev = qx(hal-get-property --udi $1 --key block.device); + #if ($blkdev =~ m/^(\S+)/) {$blkdev = $1;} + #} + #if ($is_mounted eq "false\n") { + #$vollbl = qx(hal-get-property --udi $1 --key volume.label); + #$vollbl =~ m/^(\S+)/; + #if ($vollbl =~ /^\s/) {$vollbl = 'nolabel';} + #} + + #chomp $vollbl; + #chomp $blkdev; + #$vollbl = "media/$vollbl"; + #if ($vollbl eq $share) { + #$device = $blkdev; + #} + #} + #return ( qx(/bin/mount $device "/$share" 2>&1) ); +#------------------------------------------------------------------------------------------------------- } else { return ("Error while mounting $host/$share : $VFSType not supported.\n"); } diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm --- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm 2024-06-29 13:13:35.664131766 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/Controller/Legacypanel.pm 2024-04-23 09:04:00.000000000 +0100 @@ -1,6 +1,11 @@ package SrvMngr::Controller::Legacypanel; #---------------------------------------------------------------------- +# heading : Legacy +# description : Legacy panel +# navigation : 99999 9999 +#---------------------------------------------------------------------- +#---------------------------------------------------------------------- # name : legacypanel, method : get, url : /legacypanel, ctlact : Legacypanel#main # # routes : end diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Backup/backup_en.lex smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Backup/backup_en.lex --- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Backup/backup_en.lex 2021-06-21 10:25:10.000000000 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr/I18N/Modules/Backup/backup_en.lex 2024-04-30 12:41:00.000000000 +0100 @@ -1,3 +1,4 @@ +'bac_No suitable local devices found' => 'No suitable local devices found', 'bac_BACKUP_TITLE' => 'Backup or restore server data', 'bac_BACKUP_DESC' => '

The server provides two ways to back up and restore your server: using your local desktop or a tape drive.

diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr.pm smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr.pm --- smeserver-manager-0.1.4.old/root/usr/share/smanager/lib/SrvMngr.pm 2024-06-29 13:13:35.665131795 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/lib/SrvMngr.pm 2024-05-09 10:04:17.227378431 +0100 @@ -535,7 +535,7 @@ # Determine the directory where the functions are kept #----------------------------------------------------- my $navigation_ctlr_ignore = - "(\.\.?|Swttheme\.pm|Login\.pm|Request\.pm|Modules\.pm(-.*)?)"; + "(\.\.?|Swttheme\.pm|Login\.pm|Request\.pm|Modules\.pm|Legacypanel\.pm(-.*)?)"; # "(\.\.?|Initial\.pm|Manual\.pm|Swttheme\.pm|Request\.pm|Modules\.pm(-.*)?)"; my $navigation_cgi_ignore = "(\.\.?|navigation|noframes|online-manual|(internal|pleasewait)(-.*)?)"; @@ -624,7 +624,7 @@ { $heading = $rec->prop('Heading'); $description = $rec->prop('Description'); - $headingWeight = $rec->prop('HeadingWeight'); + $headingWeight = $rec->prop('HeadingWeight') || 99999; #Stop noise in logs if file in dir does not have nav header. $descriptionWeight = $rec->prop('DescriptionWeight'); $urlpath = $rec->prop('UrlPath') || ''; $menucat = $rec->prop('MenuCat') || 'A'; # admin menu (default) Binary files smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/public/images/sme-mojo-logo-white.png and smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/public/images/sme-mojo-logo-white.png differ diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2024-06-29 13:13:35.673132033 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/layouts/default.html.ep 2024-04-29 08:56:00.000000000 +0100 @@ -19,16 +19,18 @@ %= content_for 'refresh' %= stylesheet '/js/datatables.min.css' + %= javascript '/js/datatables.min.js' + %= stylesheet '/js/jquery-ui.min.css' + %= javascript '/js/jquery-ui.min.js' - - %= stylesheet '/js/dataTables.buttons.min.js' - %= stylesheet '/js/jszip.min.js' - %= stylesheet '/js/pdfmake.min.js' - %= stylesheet '/js/vfs_fonts.js' - %= stylesheet '/js/buttons.html5.min.js' - %= stylesheet '/js/buttons.print.min.js' + %= javascript '/js/dataTables.buttons.min.js' + %= javascript '/js/jszip.min.js' + %= javascript '/js/pdfmake.min.js' + %= javascript '/js/vfs_fonts.js' + %= javascript '/js/buttons.html5.min.js' + %= javascript '/js/buttons.print.min.js' %= stylesheet '/css/sme-jquery-overrides.css' @@ -90,47 +92,6 @@ % } %= javascript '/js/sme-dataTable-setup.js' - -%= javascript begin -//Set menu to initial condition based on localStorage -$(document).ready(function() { - let menunavflag = window.localStorage.getItem('menunav'); - if (menunavflag != "false"){ - $('#menunav').toggle(true); - } else { - $('#menunav').toggle(false); - } - - let menuadmflag = window.localStorage.getItem('menuadm'); - if (menuadmflag != "false"){ - $('#menuadm').toggle(true); - } else { - $('#menuadm').toggle(false); - } - - let menuuserflag = window.localStorage.getItem('menuuser'); - if (menuuserflag != "false"){ - $('#menuuser').toggle(true); - } else { - $('#menuuser').toggle(false); - } - - var sections = document.getElementsByClassName("section-title"); - for (var i = 0, len = sections.length; i < len; i++) { - var jqObj = $(sections[i]); - var $section = jqObj.parent().next('div'); - if(!$section.length){ - return false; - } - let localStorageTag = "admSection-"+sections[i].innerHTML; - if (window.localStorage.getItem(localStorageTag) != "false"){ - $section.toggle(true); - } else { - $section.toggle(false); - } - } -}) -%end diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep 2024-06-29 13:13:35.646131231 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_footer.html.ep 2024-05-09 11:55:00.000000000 +0100 @@ -1,5 +1,6 @@ - diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep 2020-11-19 07:53:26.000000000 +0000 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_ln_del.html.ep 2024-05-09 13:58:00.000000000 +0100 @@ -49,9 +49,11 @@

%} %= hidden_field localnetwork=>$localnetwork -
- %= submit_button "$btn", class => 'action' -
+

+
+ %= submit_button "$btn", class => 'action' +

+ %end diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep 2024-06-29 13:13:35.570128971 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_ln_list.html.ep 2024-05-09 13:51:00.000000000 +0100 @@ -37,10 +37,12 @@ %= $c->render_to_string(inline => l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6,$var7)); %} -

-
+ +

+
%= submit_button "$btn", class => 'action' -

+

+ % end
diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep 2020-11-19 07:53:26.000000000 +0000 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_pf_add.html.ep 2024-05-09 14:05:00.000000000 +0100 @@ -77,9 +77,11 @@ %=text_field 'cmmnt'

-
- %= submit_button "$btn", class => 'action' -
+

+
+ %= submit_button "$btn", class => 'action' +

+ %end diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep 2020-11-19 07:53:26.000000000 +0000 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_pf_del.html.ep 2024-05-09 14:03:00.000000000 +0100 @@ -57,9 +57,10 @@ %#} %= hidden_field sport=>$sport %= hidden_field proto=>$proto -
- %= submit_button "$btn", class => 'action' -
+
+ %= submit_button "$btn", class => 'action' +

+ %end diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep 2024-06-29 13:13:35.570128971 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep 2024-05-09 14:07:00.000000000 +0100 @@ -18,8 +18,6 @@ % my $var5 = @vars[4]; % my $var6 = @vars[5]; - - %if ($ret{ret} eq "") { %= $c->render_to_string(inline => l('pf_FIRST_PAGE_DESCRIPTION')); %} elsif (index($ret{ret},"SUCCESS") != -1) { @@ -33,21 +31,22 @@ %= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6); %} -

-
+ +

+
%= submit_button "$btn", class => 'action' -

+

+ + % end -
- % if ($empty){
%=l 'pf_NO_FORWARDS' % } else {
%=l 'pf_SHOW_FORWARDS' -
+

diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep 2024-06-29 13:13:35.538128021 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/remoteaccess.html.ep 2024-05-09 13:48:00.000000000 +0100 @@ -213,10 +213,10 @@

%} - -
+

+
%= submit_button "$btn", class => 'action' -

+

% end diff -urN smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/userpassword.html.ep smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/userpassword.html.ep --- smeserver-manager-0.1.4.old/root/usr/share/smanager/themes/default/templates/userpassword.html.ep 2024-06-29 13:13:35.484126415 +0100 +++ smeserver-manager-0.1.4/root/usr/share/smanager/themes/default/templates/userpassword.html.ep 2024-05-09 13:54:00.000000000 +0100 @@ -66,9 +66,10 @@

-
- %= submit_button "$btn", class => 'action' -
+

+
+ %= submit_button "$btn", class => 'action' +

% end