diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 616c7d6ea..2fc01b9e0 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -579,7 +579,7 @@ sub mknetboot } if(grep /\$|#CMD/, $dir) { $dir = xCAT::SvrUtils->subVars($dir, $node, 'dir', $callback); - $dir = ~ s/\/\//\//g; + $dir =~ s/\/\//\//g; } if($server) { $server = xCAT::SvrUtils->subVars($server, $node, 'server', $callback); diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 7b4050d0d..7969484c7 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -395,7 +395,7 @@ sub mknetboot } if(grep /\$|#CMD/, $dir) { $dir = xCAT::SvrUtils->subVars($dir, $node, 'dir', $callback); - $dir = ~ s/\/\//\//g; + $dir =~ s/\/\//\//g; } if($server) { $server = xCAT::SvrUtils->subVars($server, $node, 'server', $callback);