(allusion to Tao Qian 陶潛|陶潜[Táo Qián], who used this phrase when he resigned from government service rather than show subservience to a visiting inspector) to bow and scrape for five pecks of rice (that being a part of his salary as a local magistrate)
(fig.) to compromise one's principles for the sake of a salary