The earliest cameras had no real "mechanism." You would prepare a plate, often still wet with chemicals, load it into the camera, bring the camera out of the dark room, set up your subject, who would have to hold still for minutes at a time, and then just...take off the lens cap.
Because what's the point of an automatic shutter when it takes minutes of exposure to get a viewable image?