sync with some fixes from opennms shell version