Suzuki: about my samurai, suzuki samurai, battery terminal


Question
hello my is bill i have a 87 suzuki samurai my suzuki has been sitting for a few months well going to be putting it back on road soon had to get another battery for it so when i got it cranked up i let it run for about 30 min or so while i cleaned it up a little bit and it run and idled great well had a problem with a head light had to fix well fixed it and say about 2 hours later went to crank it back up and it would not idle or stay running unless u kept ur foot on gas pedal so i checked a few things replaced wires plugs cap and rotor button same thing need help what do i do from here it has a new fuel pump and filter tried more stuff and still cant keep it running unless u hold pedal down what do i need to do or check from here can u help me

Answer
There is a device that closes a passage for the idle passages.  It's easily possible either the electrical circuit or the device is inoperative.
Consult a Factory Repair Manual in the carb and fuel section for an overview and details, and a wiring diagram for particulars.
Check the fuses and the battery wiring, the fuse may have blown, or the wires at the battery terminal could be corroded, causing your problem.