check for absolute path in litefile
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8778 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f142782b24
commit
8b5a9c955f
@ -121,7 +121,7 @@ sub myxCATname
|
||||
my ($junk, $name);
|
||||
|
||||
# make sure xcatd is running - & db is available
|
||||
# this routine is also called during initial install of xCAT
|
||||
# this routine is called during initial install of xCAT
|
||||
my $rc = `lsxcatd -d`;
|
||||
if ($rc == 0) {
|
||||
|
||||
@ -1067,6 +1067,14 @@ sub dolitesetup
|
||||
# ex. /foo/bar/ or /etc/lppcfg
|
||||
my ($node, $option, $file) = split (/\|/, $line);
|
||||
|
||||
# entry must be an absolute path
|
||||
unless ($file =~ m{^/}) {
|
||||
my $rsp;
|
||||
push @{$rsp->{data}}, "The litefile entry \'$file\' is not an absolute path name.\n";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
return 1;
|
||||
}
|
||||
|
||||
# ex. /foo or /etc
|
||||
my $filedir = dirname($file);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user