system_integrity from bay.

replaces #1861