- utils.sysexec( "chroot %s sh -c '" \
- "kernelversion=`ls /lib/modules | tail -1` && " \
- "rm -f /boot/initrd-$kernelversion.img && " \
- "mkinitrd /boot/initrd-$kernelversion.img $kernelversion'" % \
- SYSIMG_PATH, log )
+ # initrd set above
+ utils.removefile( "%s/boot/%s" % (SYSIMG_PATH, initrd) )
+ utils.sysexec( "chroot %s mkinitrd /boot/initrd-%s.img %s" % \
+ (SYSIMG_PATH, kernel_version, kernel_version), log )