Vishal,

Made the change, it is working now.

Thanks,
Vic


On Wed, Aug 3, 2016 at 4:56 PM, Victor Pickard <vpick...@redhat.com> wrote:

> Hi Vishal,
> Yes, I will give this a try. Thanks for sharing the fix!
>
> On Wed, Aug 3, 2016 at 4:55 PM, Vishal Thapar <vishal.tha...@ericsson.com>
> wrote:
>
>> This seems to be the one causing this particular issue:
>> https://git.opendaylight.org/gerrit/#/c/43030/
>>
>> Somehow ${PWD} in this patch gets replaced by /w in the generated karaf
>> file present in bin.
>>
>> Making changes to my karaf in-line with this patch worke for me
>>
>> Victor,
>> Can you replace the realpath() in your karaf with this:
>>
>> realpath() {
>>   OURPWD=${PWD}
>>   cd "$(dirname "${1}")"
>>   LINK=$(readlink "$(basename "${1}")")
>>   while [ "${LINK}" ]; do
>>     cd "$(dirname "${LINK}")"
>>     LINK=$(readlink "$(basename "${1}")")
>>   done
>>   REALPATH="${PWD}/$(basename "${1}")"
>>   cd "${OURPWD}"
>>   echo "${REALPATH}"
>> }
>>
>> Reference:
>> https://git.opendaylight.org/gerrit/#/c/43030/3/karaf/opendaylight-karaf-resources/src/main/resources/bin/karaf
>>
>> Regards,
>> Vishal.
>>
>> -----Original Message-----
>> From: Robert Varga [mailto:n...@hq.sk]
>> Sent: 04 August 2016 02:15
>> To: Victor Pickard <vpick...@redhat.com>; Vishal Thapar <
>> vishal.tha...@ericsson.com>; Alexis de Talhouët <adetalho...@inocybe.com>
>> Cc: controller-dev <controller-dev@lists.opendaylight.org>;
>> ovsdb-...@lists.opendaylight.org
>> Subject: Re: [controller-dev] Unable to run karaf [Windows7]
>>
>> On 08/03/2016 10:24 PM, Victor Pickard wrote:
>> > Same problem in netvirt.
>> >
>> > On Wed, Aug 3, 2016 at 4:09 PM, Vishal Thapar
>> > <vishal.tha...@ericsson.com <mailto:vishal.tha...@ericsson.com>> wrote:
>> >
>> >     Hi,____
>> >
>> >     __ __
>> >
>> >     When trying to run karaf from ovsdb/southbound's karaf I get the
>> >     following error:____
>> >
>> >     __ __
>> >
>> >     $ ./karaf____
>> >
>> >     ./karaf: line 22: readlink: command not found____
>> >
>> >     *./karaf: line 28: cd: /w: No such file or directory**____*
>> >
>> >     Error: Could not find or load main class
>> > org.apache.karaf.main.Main____
>>
>> FYI, bin/karaf is coming from odlparent, so it affects all projects
>> building a distribution.
>>
>> I do not know why have not seen this earlier, but I am pretty sure it is
>> caused by https://git.opendaylight.org/gerrit/39982 which addresses
>> BUG-6027.
>>
>> What is the environment bin/karaf is expected to run on? My understanding
>> was modern UNIX (in which case readlink is a fair request, even Solaris 10
>> has it), but if all we can rely is bashish, we need to explicitly state
>> that in the file (along with minumum bash version), so this kind of
>> breakage does not occur again.
>>
>> Bye,
>> Robert
>>
>>
>
_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to