[SCore-users-jp] Re: [SCore-users] rcp-all usage with SCore 5.4

kameyama @ pccluster.org kameyama @ pccluster.org
2003年 3月 10日 (月) 16:52:31 JST


In article <200303100701.h2A70vZG006018 @ emilepc.ess.nec.fr> Emile CARCAMO <emile.carcamo @ nec.fr> wrotes:
> 	I just noticed the following trouble when using
> 	rcp-all after installing brand new version 5.4 :
> 
> <sparepc.ess.nec.fr>[ecarcamo]<117>rsh-all -g essfrance uname -a 
> node01.ess.nec.fr
> node02.ess.nec.fr
> node01.ess.nec.fr: Linux node01.ess.nec.fr 2.4.19-1SCORE #1 Wed Feb 5 14:10:3
> 8 
> JST 2003 i686 unknown
> node02.ess.nec.fr: Linux node02.ess.nec.fr 2.4.19-1SCORE #1 Wed Feb 5 14:10:3
> 8 
> JST 2003 i686 unknown
> <sparepc.ess.nec.fr>[ecarcamo]<118>
> <sparepc.ess.nec.fr>[ecarcamo]<118>rcp-all /etc/printcap essfrance:/tmp 
> SCOUT: Spawning done.            
> [node01-2]:
> if: Expression Syntax.
> SCOUT: Session done.

Sorry, rcp-all is not work if compute host's login shell is csh or tcsh.
Please apply this patch to rcp-all.

                       from Kameyama Toyohisa
---------------------------------------cut here---------------------------------
Index: rcp-all.pl
===================================================================
RCS file: /develop/cvsroot/score-src/program/utils/rcp-all/rcp-all.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- rcp-all.pl	25 Oct 2002 04:44:57 -0000	1.10
+++ rcp-all.pl	10 Mar 2003 07:42:42 -0000	1.11
@@ -82,9 +82,9 @@
     my ($file) = @files[0];
     $file_basename = basename($file);
     $filemode = sprintf "%03o", (stat($file))[2] & 0777;
-    $scout_command = "scout -wait -g $group -re '\"if [ -d $remote_dir ]; then cat > "
-        . "$remote_dir/$file_basename;chmod $filemode $remote_dir/$file_basename;"
-        . "else cat > $remote_dir;chmod $filemode $remote_dir; fi\"'";
+    $scout_command = "scout -wait -g $group -re '\"[ -d $remote_dir ] && (cat > "
+        . "$remote_dir/$file_basename;chmod $filemode $remote_dir/$file_basename);"
+        . "[ -d $remote_dir ] || (cat > $remote_dir;chmod $filemode $remote_dir) \"'";
     open(REMOTE, "|$scout_command") or Error("Cannot exec scout command $!");
     open(LOCAL, $file) or Error("Cannot open $file $!");
     while(sysread(LOCAL, $_, $bufsize)) {
---------------------------------------cut here---------------------------------
_______________________________________________
SCore-users mailing list
SCore-users @ pccluster.org
http://www.pccluster.org/mailman/listinfo/score-users



SCore-users-jp メーリングリストの案内