From a88662b894114744976aacaf4bdc92cd2c47cb78 Mon Sep 17 00:00:00 2001 From: lissav Date: Mon, 27 Oct 2008 16:08:14 +0000 Subject: [PATCH] use get_image_name routine in xdsh git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2393 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/DSHCLI.pm | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index 74cfda7cd..8c4d5a1f8 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -3652,21 +3652,7 @@ sub parse_and_run_dsh # we will use the create the nostname from the directory # for the hostname in the output my $path = $options{'rootimg'}; - if (xCAT::Utils->isLinux()) - { - my @fields = split('/', $path); - $imagename .= $fields[5]; - $imagename .= "."; - $imagename .= $fields[3]; - $imagename .= "."; - $imagename .= $fields[4]; - } - else - { # AIX - my @fields = split('/', $path); - my $name = pop @fields; - $imagename = $name; - } + $imagename= xCAT::Utils->get_image_name($path); if (defined(@$nodes)) { my $rsp = ();