✨ iso with custom user, pass, uid + systemd units
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
93b254055a
commit
fa6439bce8
3 changed files with 77 additions and 1 deletions
18
src/main.rs
18
src/main.rs
|
@ -26,11 +26,29 @@ fn main() {
|
|||
iso_args.get_one("kb_variant").map(|x: &String| x.as_str());
|
||||
let auto_install_config: Option<&String> = iso_args.get_one("install");
|
||||
|
||||
let user: Option<&String> = iso_args.get_one("user");
|
||||
let pass: Option<&String> = iso_args.get_one("pass");
|
||||
let uid: Option<&String> = iso_args.get_one("uid");
|
||||
|
||||
let user = if user.is_some() && pass.is_some() {
|
||||
Some((
|
||||
user.unwrap().to_string(),
|
||||
pass.unwrap().to_string(),
|
||||
uid.map(|x| x.parse().unwrap()).unwrap_or(1000),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let units: Vec<_> = iso_args.get_many("unit").unwrap_or_default().collect();
|
||||
|
||||
create_iso(
|
||||
without_gui,
|
||||
no_tmp,
|
||||
kb_layout,
|
||||
kb_variant,
|
||||
user,
|
||||
units.into_iter().map(|x: &String| x.to_string()).collect(),
|
||||
auto_install_config,
|
||||
);
|
||||
std::process::exit(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue