From a5ec8dcc36931d6adf261b8c6d916c84660fab01 Mon Sep 17 00:00:00 2001 From: sjing Date: Thu, 30 May 2013 06:11:56 +0000 Subject: [PATCH] use reboot in genesis instead of shutdown. Add a check for rsync service to make sure it's running. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16470 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 9 +++++++++ xCAT-server/lib/xcat/plugins/imgcapture.pm | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 046400d05..f98d096c1 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -1860,6 +1860,15 @@ sub mksysclone } } + + # check systemimager-server-rsyncd to make sure it's running. + my $out = xCAT::Utils->runcmd("service systemimager-server-rsyncd status", -1); + if ($::RUNCMD_RC != 0) { # not running + my $rc = xCAT::Utils->startService("systemimager-server-rsyncd"); + if ($rc != 0) { + return 1; + } + } } sub copycd { diff --git a/xCAT-server/lib/xcat/plugins/imgcapture.pm b/xCAT-server/lib/xcat/plugins/imgcapture.pm index 85d04550a..9c61034b7 100644 --- a/xCAT-server/lib/xcat/plugins/imgcapture.pm +++ b/xCAT-server/lib/xcat/plugins/imgcapture.pm @@ -611,6 +611,10 @@ sub sysclone_getimg{ return 1; } + # use reboot in genesis + my $masterscript = $sysclone_home . "/scripts" . "/$osimage.master"; + my $rc = `sed -i "s/shutdown -r now/reboot -f/g" $masterscript`; + return 0; }