Menu

#4180 [DEV]"xcatconfig -i" complains"Command failed: find /usr/share/zoneinfo -type f -exec cmp -s /etc/localtime {} \; -print | grep -v posix | grep -v SystemV 2>&1. Error message: ." on ubuntu14.04

2.8.5
pending
yangsong
general
5
2014-07-01
2014-07-01
yangsong
No

on ubuntu14.04 MN, "xcatconfig -i" complains "Command failed: find /usr/share/zoneinfo -type f -exec cmp -s /etc/localtime {} \; -print | grep -v posix | grep -v SystemV 2>&1. Error message: ."

Discussion

  • yangsong

    yangsong - 2014-07-01
    • status: open --> pending
     
  • yangsong

    yangsong - 2014-07-01

    fixed in 2.8.5:
    commit f947c49b9f0bbacaee4d85abdd26469663a24dc4
    Author: immarvin yangsbj@cn.ibm.com
    Date: Tue Jul 1 03:04:25 2014 -0700

    fix defect #4180 [DEV](xcatconfig -i) complains (Command failed: find /usr/share/zoneinfo -type f -exec cmp -s /etc/localtime {} \; -print | grep -v posix | grep -v SystemV 2>&1. Error message: .) on ubuntu14.04
    

    diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm
    index bd3b51b..cb3ba1a 100644
    --- a/perl-xCAT/xCAT/Utils.pm
    +++ b/perl-xCAT/xCAT/Utils.pm
    @@ -3513,7 +3513,7 @@ sub gettimezone
    } else { # all linux
    my $localtime = "/etc/localtime";
    my $zoneinfo = "/usr/share/zoneinfo";
    - my $cmd = "find $zoneinfo -type f -exec cmp -s $localtime {} \; -print | grep -v posix | grep -v SystemV";
    + my $cmd = "find $zoneinfo -xtype f -exec cmp -s $localtime {} \; -print | grep -v posix | grep -v SystemV | grep -v right | grep -v localtime ";
    my $zone_result = xCAT::Utils->runcmd("$cmd", 0);
    if ($::RUNCMD_RC != 0)
    {

    fixed in 2.9:
    commit 364849f5bdf4639f00cae98105ba585fdf587654
    Author: immarvin yangsbj@cn.ibm.com
    Date: Tue Jul 1 03:04:25 2014 -0700

    fix defect #4180 [DEV](xcatconfig -i) complains (Command failed: find /usr/share/zoneinfo -type f -exec cmp -s /etc/localtime {} \; -print | grep -v posix | grep -v SystemV 2>&1. Error message: .) on ubuntu14.04
    

    diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm
    index c37fdb4..a09844f 100644
    --- a/perl-xCAT/xCAT/Utils.pm
    +++ b/perl-xCAT/xCAT/Utils.pm
    @@ -3540,7 +3540,7 @@ sub gettimezone
    } else { # all linux
    my $localtime = "/etc/localtime";
    my $zoneinfo = "/usr/share/zoneinfo";
    - my $cmd = "find $zoneinfo -type f -exec cmp -s $localtime {} \; -print | grep -v posix | grep -v SystemV";
    + my $cmd = "find $zoneinfo -xtype f -exec cmp -s $localtime {} \; -print | grep -v posix | grep -v SystemV | grep -v right | grep -v localtime ";
    my $zone_result = xCAT::Utils->runcmd("$cmd", 0);
    if ($::RUNCMD_RC != 0)
    {

     
MongoDB Logo MongoDB