From 01509eb35acb1777f5a215e5e94a238d9e74a9f6 Mon Sep 17 00:00:00 2001 From: Amy Date: Fri, 28 Jan 2022 15:30:10 +0100 Subject: [PATCH] remove create-hosts arg, now autogenerates it --- README.md | 5 ----- src/main.rs | 16 ++++------------ 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index bfb1e7c..37cf236 100755 --- a/README.md +++ b/README.md @@ -50,11 +50,6 @@ jade genfstab jade locale colemak Europe/Berlin "en_US.UTF-8 UTF-8" ``` -### create /etc/hosts -```sh -jade networking --hosts -``` - ### configue network settings ```sh # set the hostname to getcryst.al with ipv6 disabled diff --git a/src/main.rs b/src/main.rs index c117ed6..d30c19c 100755 --- a/src/main.rs +++ b/src/main.rs @@ -93,12 +93,6 @@ fn main() { .help("The hostname to use") .required(true), ) - .arg( - Arg::with_name("create-hosts") - .help("create /etc/hosts") - .long("hosts") - .takes_value(false), - ) .arg( Arg::with_name("ipv6") .help("Wether ipv6 should be enabled") @@ -156,21 +150,19 @@ fn main() { app.is_present("efi"), ); } 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( app.values_of("locales") .unwrap() .collect::>() .join(" "), ); - locale::set_keyboard(kbrlayout); - locale::set_timezone(timezn); + locale::set_keyboard(app.value_of("keyboard").unwrap()); + locale::set_timezone(app.value_of("timezone").unwrap()); } else if let Some(app) = app.subcommand_matches("networking") { if app.is_present("ipv6") { + network::create_hosts(); network::enable_ipv6() - } - if app.is_present("create-hosts") { + } else { network::create_hosts() } network::set_hostname(app.value_of("hostname").unwrap())