Various - space in reboot panel, max 15 chars for workgroup name, add action for recofigure, remove call to TAI64 in viewlogfiles, add requires for multi-language locales
This commit is contained in:
3
root/etc/e-smith/events/actions/post-upgrade-and-reboot
Executable file
3
root/etc/e-smith/events/actions/post-upgrade-and-reboot
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
/usr/sbin/e-smith/signal-event post-upgrade
|
||||
/usr/sbin/e-smith/signal-event reboot
|
@@ -56,10 +56,11 @@ sub do_action {
|
||||
|
||||
# esmith::util::backgroundCommand( 1, "/sbin/e-smith/signal-event", "post-upgrade",
|
||||
# "; ", "/sbin/e-smith/signal-event", "reboot" );
|
||||
system("/sbin/e-smith/signal-event", "post-upgrade") == 0
|
||||
or die("Error occurred while running post-upgrade.\n");
|
||||
system("/sbin/e-smith/signal-event", "reboot") == 0
|
||||
or die("Error occurred while rebooting.\n");
|
||||
esmith::util::backgroundCommand( 1, "/sbin/e-smith/signal-event", "post-upgrade-and-reboot");
|
||||
#system("/sbin/e-smith/signal-event", "post-upgrade") == 0
|
||||
#or die("Error occurred while running post-upgrade.\n");
|
||||
#system("/sbin/e-smith/signal-event", "reboot") == 0
|
||||
#or die("Error occurred while rebooting.\n");
|
||||
} ## end unless ($debug)
|
||||
} ## end elsif ($function eq 'reconfigure')
|
||||
$c->stash(title => $title, modul => $result);
|
||||
|
@@ -17,7 +17,7 @@ use Locale::gettext;
|
||||
use SrvMngr::I18N;
|
||||
use SrvMngr qw(theme_list init_session);
|
||||
use esmith::ConfigDB;
|
||||
use Time::TAI64;
|
||||
#use Time::TAI64;
|
||||
use File::Basename;
|
||||
use HTML::Entities;
|
||||
use esmith::FormMagick qw(gen_locale_date_string);
|
||||
@@ -104,10 +104,11 @@ sub do_action {
|
||||
sub timestamp2local {
|
||||
$_ = shift;
|
||||
|
||||
if (/^(\@[0-9a-f]{24})(.*)/s) {
|
||||
return Time::TAI64::tai64nlocal($1) . $2;
|
||||
} elsif (/^([0-9]{10}\.[0-9]{3})(.*)/s) {
|
||||
return localtime($1) . $2;
|
||||
#if (/^(\@[0-9a-f]{24})(.*)/s) {
|
||||
# return Time::TAI64::tai64nlocal($1) . $2;
|
||||
#} els
|
||||
if (/^([0-9]{10}\.[0-9]{3})(.*)/s) {
|
||||
return localtime($1) . $2;
|
||||
}
|
||||
return $_;
|
||||
} ## end sub timestamp2local
|
||||
|
Reference in New Issue
Block a user