|
|
@ -93,12 +93,6 @@ fn main() {
|
|
|
|
.help("The hostname to use")
|
|
|
|
.help("The hostname to use")
|
|
|
|
.required(true),
|
|
|
|
.required(true),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
|
|
|
|
Arg::with_name("create-hosts")
|
|
|
|
|
|
|
|
.help("create /etc/hosts")
|
|
|
|
|
|
|
|
.long("hosts")
|
|
|
|
|
|
|
|
.takes_value(false),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.arg(
|
|
|
|
.arg(
|
|
|
|
Arg::with_name("ipv6")
|
|
|
|
Arg::with_name("ipv6")
|
|
|
|
.help("Wether ipv6 should be enabled")
|
|
|
|
.help("Wether ipv6 should be enabled")
|
|
|
@ -165,21 +159,19 @@ fn main() {
|
|
|
|
app.is_present("efi"),
|
|
|
|
app.is_present("efi"),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if let Some(app) = app.subcommand_matches("locale") {
|
|
|
|
} else if let Some(app) = app.subcommand_matches("locale") {
|
|
|
|
let kbrlayout = app.value_of("keyboard").unwrap();
|
|
|
|
|
|
|
|
let timezn = app.value_of("timezone").unwrap();
|
|
|
|
|
|
|
|
locale::set_locale(
|
|
|
|
locale::set_locale(
|
|
|
|
app.values_of("locales")
|
|
|
|
app.values_of("locales")
|
|
|
|
.unwrap()
|
|
|
|
.unwrap()
|
|
|
|
.collect::<Vec<&str>>()
|
|
|
|
.collect::<Vec<&str>>()
|
|
|
|
.join(" "),
|
|
|
|
.join(" "),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
locale::set_keyboard(kbrlayout);
|
|
|
|
locale::set_keyboard(app.value_of("keyboard").unwrap());
|
|
|
|
locale::set_timezone(timezn);
|
|
|
|
locale::set_timezone(app.value_of("timezone").unwrap());
|
|
|
|
} else if let Some(app) = app.subcommand_matches("networking") {
|
|
|
|
} else if let Some(app) = app.subcommand_matches("networking") {
|
|
|
|
if app.is_present("ipv6") {
|
|
|
|
if app.is_present("ipv6") {
|
|
|
|
|
|
|
|
network::create_hosts();
|
|
|
|
network::enable_ipv6()
|
|
|
|
network::enable_ipv6()
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if app.is_present("create-hosts") {
|
|
|
|
|
|
|
|
network::create_hosts()
|
|
|
|
network::create_hosts()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
network::set_hostname(app.value_of("hostname").unwrap())
|
|
|
|
network::set_hostname(app.value_of("hostname").unwrap())
|
|
|
|