227
227
utils.execute(*cmd, run_as_root=True, check_exit_code=[0])
231
231
grub_defaults = chroot + guess_grub2_default(chroot=chroot)
232
232
rekerparams = re.compile(r'^.*GRUB_CMDLINE_LINUX=.*')
235
236
with open(grub_defaults) as f:
238
239
'GRUB_CMDLINE_LINUX="{kernel_params}"'.
239
240
format(kernel_params=kernel_params), line)
241
242
format(grub_timeout=grub_timeout), line)
243
245
# NOTE(agordeev): explicitly add record fail timeout, in order to
244
246
# prevent user confirmation appearing if unexpected reboot occured.
245
247
new_content += '\nGRUB_RECORDFAIL_TIMEOUT={grub_timeout}\n'.\