While here, pull in some rc script improvements [1] PR: 246775 [1] Submitted by: Dmitry Wagin <dmitry.wagin@ya.ru> [1] (with changes)