diff --git a/src/create.rs b/src/create.rs index a176bc38..673e763b 100644 --- a/src/create.rs +++ b/src/create.rs @@ -29,7 +29,6 @@ pub fn create_container( bundle: PathBuf, pidfile: Option, console_socket: Option, - hermit_env: Option, debug_config: bool, child_log_level: LogLevel, ) { @@ -108,8 +107,6 @@ pub fn create_container( }; if is_hermit_container { info!("Detected RustyHermit executable. Creating container in hermit mode!"); - //Setup hermit environment - hermit::prepare_environment(&project_dir, &hermit_env); } //Setup exec fifo diff --git a/src/hermit.rs b/src/hermit.rs index 45a0be5a..2eea4e45 100644 --- a/src/hermit.rs +++ b/src/hermit.rs @@ -1,7 +1,7 @@ use crate::network; use goblin::elf; use goblin::elf64::header::EI_OSABI; -use std::{fs, path::Path, path::PathBuf}; +use std::{fs, path::Path}; pub fn is_hermit_app(path: &Path) -> bool { let buffer = fs::read(path) @@ -14,29 +14,6 @@ pub fn is_hermit_app(path: &Path) -> bool { } } -pub fn create_environment(_path: &Path) { - //TODO -} - -pub fn get_environment_path(project_dir: &Path, hermit_env_path: &Option) -> PathBuf { - match hermit_env_path { - Some(s) => s.clone(), - None => project_dir.join("hermit"), - } -} - -pub fn prepare_environment(project_dir: &Path, hermit_env_path: &Option) { - let environment_path = get_environment_path(project_dir, hermit_env_path); - if !environment_path.exists() { - create_environment(&environment_path); - } else if !environment_path.is_dir() { - panic!( - "Environment path at {:?} exists but is not a directory!", - &environment_path - ); - } -} - pub enum NetworkConfig { TapNetwork(network::VirtioNetworkConfig), UserNetwork(u16), diff --git a/src/main.rs b/src/main.rs index 54a8a303..b5628483 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,7 +91,6 @@ fn parse_matches(cli: &Cli) { bundle.clone(), pid_file.clone(), console_socket.clone(), - cli.hermit_env.clone(), cli.debug_config, cli.log_level, ), @@ -213,10 +212,6 @@ struct Cli { #[arg(long, default_value_t, value_enum)] log_format: LogFormat, - /// Path to the hermit-environment. Defaults to /hermit - #[arg(long, value_name = "HERMIT_ENV_PATH")] - hermit_env: Option, - /// Write out any logs to the runh root directory in addition to the specified log path. #[arg(long, default_value_t)] debug_log: bool,