|
|
@ -9,11 +9,17 @@ use alloc::vec::Vec;
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(not(feature = "run_cmdline"))]
|
|
|
|
#[cfg(not(feature = "run_cmdline"))]
|
|
|
|
pub fn run_user_shell() {
|
|
|
|
pub fn run_user_shell() {
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
/// the busybox of alpine linux can not transfer env vars into child process
|
|
|
|
let init_shell="/bin/busybox";
|
|
|
|
/// Now we use busybox from
|
|
|
|
|
|
|
|
/// https://raw.githubusercontent.com/docker-library/busybox/82bc0333a9ae148fbb4246bcbff1487b3fc0c510/musl/busybox.tar.xz -O busybox.tar.xz
|
|
|
|
#[cfg(not(target_arch = "x86_64"))]
|
|
|
|
/// This one can transfer env vars!
|
|
|
|
let init_shell="/busybox";
|
|
|
|
/// Why???
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// #[cfg(target_arch = "x86_64")]
|
|
|
|
|
|
|
|
// let init_shell="/bin/busybox"; // from alpine linux
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// #[cfg(not(target_arch = "x86_64"))]
|
|
|
|
|
|
|
|
let init_shell="/busybox"; //from docker-library
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
let init_envs=vec!["PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/x86_64-alpine-linux-musl/bin".into()];
|
|
|
|
let init_envs=vec!["PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/x86_64-alpine-linux-musl/bin".into()];
|
|
|
|