Update scripts for attach/detatch.