From 0e6c8deec3bae74b9eb69df5c1ab20a27b3c46c4 Mon Sep 17 00:00:00 2001 From: sikorsky Date: Wed, 10 Sep 2008 14:59:34 +0000 Subject: [PATCH] This patch modifies sles/genimage script to first run "cvs update" in sles directory and if something happens (some files get updated), then it runs (execs) genimage script with the same options once again. Purpose is to 1) keep track of changes in CVS, so force users to do any changes via CVS system and 2) avoid malicious behaviour of users. I don't want to break trunk, so it's commented out. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2123 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/sles/genimage | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 515d8d904..ad1a4cf1b 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -38,6 +38,21 @@ sub xdie { die @_; } +#-- fetch current version form CVS (overwrite locally changed versions) +# if (opendir(CVS,"$pathtofiles/CVS")){ +# close CVS; +# my $cvsout = qx/cd $pathtofiles; cvs update -C 2>&1/; +# chomp $cvsout; +# if ( $cvsout ne "cvs update: Updating ." ) { +# print "Difference of local copy from CVS detected\n"; +# print $cvsout,"\n"; +# print "Trying to re-run $name\n"; +# print("$pathtofiles/$name ",join(" ",@ARGV),"\n"); +# exec("$pathtofiles/$name",@ARGV); +# } +# } + + $SIG{INT} = $SIG{TERM} = sub { xdie "Interrupted" }; GetOptions( 'a=s' => \$arch,