update script to work with later versions of opennms