The portents, however, did not look good when their opening partnership again failed to dig in. Aiden Markram again fell to the charms of Mohammed Shami, who trapped him LBW for seven with the total on just 14.
Elgar and Petersen then negotiated the tricky period to stumps.
Bowlers put Proteas in position of promise
SA however were placed in a position of promise by a seam attack that took a while to get going. They only made a breakthrough after the first drinks break when Jansen got Mayank Agarwal to nick one.
Jansen has gone from strength to strength since his nervy debut burst in the first Test. He offers variation with left arm seam that often arrives at a disconcerting height.
Though Jansen made the initial breakthrough, it was Olivier who dragged the rest of the attack along after settling into a more searching line of interrogation of the batters' technique.
By removing Cheteshwar Pujara and Ajinkya Rahane just before lunch, Olivier became the third-fastest South African to the 50-Test wicket mark after Vernon Philander and Peter Pollock.
To be fair, there were also some lamentable shots in the India first innings, as was the case in the dismissals of Rahane and Shardul Thakur. Ravichandran Ashwin also played a shot better suited to the white ball but he did face the looming prospect of running out of willing and able partners.