|
|
@ -7,13 +7,13 @@ use crate::config::Config;
|
|
|
|
use crate::error::MkrootResult;
|
|
|
|
use crate::error::MkrootResult;
|
|
|
|
|
|
|
|
|
|
|
|
pub fn os_release(config: &Config) -> MkrootResult<()> {
|
|
|
|
pub fn os_release(config: &Config) -> MkrootResult<()> {
|
|
|
|
if config.verbose {
|
|
|
|
|
|
|
|
println!("Creating file etc/os-release");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let mut path = PathBuf::from(&config.root_dir);
|
|
|
|
let mut path = PathBuf::from(&config.root_dir);
|
|
|
|
path.push("etc/os-release");
|
|
|
|
path.push("etc/os-release");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if config.verbose {
|
|
|
|
|
|
|
|
println!("Creating file {}", &path.display());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let f = File::create(&path)?;
|
|
|
|
let f = File::create(&path)?;
|
|
|
|
let mut writer = BufWriter::new(f);
|
|
|
|
let mut writer = BufWriter::new(f);
|
|
|
|