From 7fa1bdadb997f4d29dc09526dbd8bf4def28fc09 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Wed, 18 Oct 2017 21:23:29 +0000 Subject: [PATCH] Can't forget this... --- rust/src/init/main.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/rust/src/init/main.rs b/rust/src/init/main.rs index 53667fc..ba6a622 100644 --- a/rust/src/init/main.rs +++ b/rust/src/init/main.rs @@ -1,8 +1,8 @@ extern crate libc; -use std::env; use std::io; use std::process::{self, Child,Command,Stdio}; +use std::os::unix::process::CommandExt; mod sys; @@ -71,7 +71,7 @@ fn setup_mounts() -> io::Result<()> { fn setup() -> io::Result<()> { setup_overlay()?; setup_mounts()?; - sethostname("Airwolf")?; + sethostname("airwolf")?; setsid()?; set_controlling_tty(0, true)?; Ok(()) @@ -85,6 +85,7 @@ fn run_shell() -> io::Result{ .stdin(Stdio::inherit()) .stdout(Stdio::inherit()) .stderr(Stdio::inherit()) + .before_exec(|| {println!("{}", SPLASH);Ok(())}) .spawn() } @@ -121,3 +122,14 @@ fn main() { let _ = wait_for_child(); } } + +const SPLASH: &str = r#" + ------------------------------||------------------------------- + [##] + /~~~~~~\ + |~~\ /~~| + ==][===|___||___|===][== + [::] ( () ) [::] + ~/~~~~\~ + O' `o +"#; \ No newline at end of file