From c40e8e109ab6e6cc770f4b8099f0684c7cb677e1 Mon Sep 17 00:00:00 2001 From: immarvin Date: Mon, 9 Jun 2014 20:18:05 -0700 Subject: [PATCH] replace the service stuff with newly added systemd subroutines --- xCAT-rmc/scripts/monerrorlog | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xCAT-rmc/scripts/monerrorlog b/xCAT-rmc/scripts/monerrorlog index 54e1d4354..d0908d720 100755 --- a/xCAT-rmc/scripts/monerrorlog +++ b/xCAT-rmc/scripts/monerrorlog @@ -10,12 +10,17 @@ checks for errors. =cut #------------------------------------------------------------------------------# - +BEGIN +{ + $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; +} +use lib "$::XCATROOT/lib/perl"; use strict; use locale; use Getopt::Long; use IPC::SysV qw(IPC_STAT S_IRWXU IPC_PRIVATE IPC_CREAT S_IRUSR S_IWUSR ); use IPC::Msg; +use xCAT::Utils; BEGIN { @@ -109,8 +114,9 @@ if (&first_time_run) runcmd("/usr/bin/mkfifo $fifo"); } runcmd("echo \"$embedinfo\" >> $syslogconf"); - my $cmd = service("syslog", "restart"); - runcmd($cmd); + #my $cmd = service("syslog", "restart"); + #runcmd($cmd); + xCAT::Utils->restartservice("syslog"); } touchFile($runfile); } @@ -512,6 +518,9 @@ sub createRandomName 'stop' or 'status'. Returns: A full cli for the service script. + Comment: + this subroutine is deprecated, use service subroutines in xCAT::Utils + instead =cut #--------------------------------------------------------------------------------