Davide Bertola 2 months ago
parent ba206ae595
commit 91a8157d99

@ -340,6 +340,27 @@ pub fn run(opts: Options) -> Result<()> {
} }
} }
} }
// WIP: copy kernel config as well
// This is currently based on name conventions and
// configs are not passed-in, so not ideal
let config_path = PathBuf::from(
kernel_image
.to_string_lossy()
.replace("vmlinuz-", "config-"),
);
if config_path.exists() {
for bytes in [
"file /boot/".as_bytes(),
config_path.as_os_str().as_bytes(),
" ".as_bytes(),
config_path.as_os_str().as_bytes(),
" 0755 0 0\n".as_bytes(),
] {
stdin.write_all(bytes).expect("write");
}
}
// Must explicitly close to signal EOF. // Must explicitly close to signal EOF.
drop(stdin); drop(stdin);

Loading…
Cancel
Save