diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index c0bfa3fcd..efeced646 100755 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -221,16 +221,18 @@ sub copycd return; } - if ( $copypath || $nonoverwrite ){ - $callback->({info=> ["copycd on debian/ubuntu doesn't support -p, -w options!"]}); - return; - } - unless (-r $path . "/.disk/info") { #xCAT::MsgUtils->message("S","The CD doesn't look like a Debian CD, exiting..."); return; } + + if ( $copypath || $nonoverwrite ) + { + $callback->({info=> ["copycds on Ubuntu/Debian does not support -p or -w option."]}); + return; + } + my $dinfo; open($dinfo, $path . "/.disk/info"); my $line = <$dinfo>; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 5ebf2ca38..836c72c53 100755 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -1621,10 +1621,17 @@ sub copycd ); unless ($mntpath) { - - #this plugin needs $mntpath... + # $mntpath needs to be specified for this plugin return; } + + if ($path) { + # if path if specified, clean up removing trailing slash... + $path =~ s/\/$//; + # and multiple slashes + $path =~ s,//*,/,g; + } + if ($distname and $distname !~ /^sles|^suse/) {