Skip to content

Commit

Permalink
feat(util): grub config with label search instead
Browse files Browse the repository at this point in the history
  • Loading branch information
korewaChino committed Jul 4, 2024
1 parent 89a84d4 commit a625c7a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,18 @@ macro_rules! ini_enum {
}
}
}
/// Generates a generic GRUB config for our use case.
///
pub fn grub_config() -> String {
// let's search for an xbootldr label
// because we never know what the device will be
format!(
r#"
search --no-floppy --label --set=dev xbootldr
set prefix=($dev)/grub2
export $prefix
configfile $prefix/grub.cfg
"#
)
}

0 comments on commit a625c7a

Please sign in to comment.