Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
8cd68dc0
Commit
8cd68dc0
authored
Mar 27, 2013
by
Marco Ratto
Browse files
1) Fix compatibility problems with the Port field in unix nodes of the cluster;
2) bug fix in security checks;
parent
0a2f7f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/parallel/dynareParallelRmDir.m
View file @
8cd68dc0
...
...
@@ -36,13 +36,13 @@ if nargin ==0,
end
% security check of remote folder delete
ok
(
1
)
=
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'..'
));
tmp1
=
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'2'
);
ok
(
1
)
=
isempty
(
strfind
(
P
RCDi
r
,
'..'
));
tmp1
=
strfind
(
P
RCDi
r
,
'2'
);
ok
(
2
)
=
tmp1
(
1
)
==
1
;
ok
(
3
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'-'
));
ok
(
4
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'h'
));
ok
(
5
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
'm'
));
ok
(
6
)
=~
isempty
(
strfind
(
P
arallel_info
.
RemoteTmpFolde
r
,
's'
));
ok
(
3
)
=~
isempty
(
strfind
(
P
RCDi
r
,
'-'
));
ok
(
4
)
=~
isempty
(
strfind
(
P
RCDi
r
,
'h'
));
ok
(
5
)
=~
isempty
(
strfind
(
P
RCDi
r
,
'm'
));
ok
(
6
)
=~
isempty
(
strfind
(
P
RCDi
r
,
's'
));
ok
(
7
)
=~
isempty
(
PRCDir
);
if
sum
(
ok
)
<
7
,
...
...
@@ -55,8 +55,13 @@ for indPC=1:length(Parallel),
error
(
'The remote folder path structure does not comply the security standards!'
),
end
while
(
1
)
if
~
ispc
||
strcmpi
(
'unix'
,
Parallel
(
indPC
)
.
OperatingSystem
)
[
stat
NonServe
]
=
system
([
'ssh '
,
Parallel
(
indPC
)
.
UserName
,
'@'
,
Parallel
(
indPC
)
.
ComputerName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'/'
,
PRCDir
,]);
if
~
ispc
||
strcmpi
(
'unix'
,
Parallel
(
indPC
)
.
OperatingSystem
),
if
~
isempty
(
Parallel
(
indPC
)
.
Port
),
ssh_token
=
[
'-p '
,
Parallel
(
indPC
)
.
Port
];
else
ssh_token
=
''
;
end
[
stat
NonServe
]
=
system
([
'ssh '
,
ssh_token
,
' '
,
Parallel
(
indPC
)
.
UserName
,
'@'
,
Parallel
(
indPC
)
.
ComputerName
,
' rm -fr '
,
Parallel
(
indPC
)
.
RemoteDirectory
,
'/'
,
PRCDir
,]);
break
;
else
if
exist
(
'OCTAVE_VERSION'
),
% Patch for peculiar behaviour of rmdir under Windows.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment