kernel-post-upgrade: remove an unused function
kernel-post-upgrade: factor out the ESP tests