#!/bin/sh
# check if we are on real system
if [ -z "${IPKG_INSTROOT}" ]; then
	echo -n "Stopping pbr service... "
	/etc/init.d/pbr stop >/dev/null 2>&1 && echo "OK" || echo "FAIL"
	echo -n "Removing rc.d symlink for pbr... "
	/etc/init.d/pbr disable && echo "OK" || echo "FAIL"
	/etc/init.d/pbr netifd check && {
		echo -n "Uninstalling pbr netifd integration... "
		/etc/init.d/pbr netifd uninstall >/dev/null 2>&1 && echo "OK" || echo "FAIL"
	}
fi
exit 0
