|
|
@ -350,11 +350,14 @@ pub fn run(opts: Options) -> Result<()> {
|
|
|
|
.replace("vmlinuz-", "config-"),
|
|
|
|
.replace("vmlinuz-", "config-"),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if config_path.exists() {
|
|
|
|
if config_path.exists() {
|
|
|
|
|
|
|
|
let mut destination = PathBuf::from("/boot/");
|
|
|
|
|
|
|
|
destination.set_file_name(config_path.file_name().expect("filename"));
|
|
|
|
for bytes in [
|
|
|
|
for bytes in [
|
|
|
|
"file /boot/".as_bytes(),
|
|
|
|
"dir /boot 0755 0 0\n".as_bytes(),
|
|
|
|
|
|
|
|
"file ".as_bytes(),
|
|
|
|
config_path.as_os_str().as_bytes(),
|
|
|
|
config_path.as_os_str().as_bytes(),
|
|
|
|
" ".as_bytes(),
|
|
|
|
" ".as_bytes(),
|
|
|
|
config_path.as_os_str().as_bytes(),
|
|
|
|
destination.as_os_str().as_bytes(),
|
|
|
|
" 0755 0 0\n".as_bytes(),
|
|
|
|
" 0755 0 0\n".as_bytes(),
|
|
|
|
] {
|
|
|
|
] {
|
|
|
|
stdin.write_all(bytes).expect("write");
|
|
|
|
stdin.write_all(bytes).expect("write");
|
|
|
|