Bug #4518 - extra slash in the symlink when -p option is presented
For sles.pm, clean up the $path variable to remove multiple slash and trailing slash. In debian.pm , move the check for -p and -w further down so it does not appear unless we have decided that debian is the image we are copying. The message is misleading when copycds is run for non ubuntu/debian OSes
This commit is contained in:
parent
350421129d
commit
30f6a66814
@ -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>;
|
||||
|
@ -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/)
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user