Set file as login scheme
This commit is contained in:
parent
f2dcefc882
commit
9f7bcf0f59
5
Makefile
5
Makefile
|
@ -33,6 +33,7 @@ clean:
|
||||||
cargo clean --manifest-path programs/login/Cargo.toml
|
cargo clean --manifest-path programs/login/Cargo.toml
|
||||||
cargo clean --manifest-path programs/coreutils/Cargo.toml
|
cargo clean --manifest-path programs/coreutils/Cargo.toml
|
||||||
cargo clean --manifest-path schemes/example/Cargo.toml
|
cargo clean --manifest-path schemes/example/Cargo.toml
|
||||||
|
cargo clean --manifest-path schemes/redoxfs/Cargo.toml
|
||||||
rm -rf initfs/bin
|
rm -rf initfs/bin
|
||||||
rm -rf filesystem/bin
|
rm -rf filesystem/bin
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
@ -203,8 +204,8 @@ filesystem/bin/%: schemes/%/Cargo.toml schemes/%/src/** $(BUILD)/libstd.rlib
|
||||||
rm $@.d
|
rm $@.d
|
||||||
|
|
||||||
drivers: \
|
drivers: \
|
||||||
initfs/bin/ps2d \
|
filesystem/bin/ps2d \
|
||||||
initfs/bin/vesad
|
filesystem/bin/vesad
|
||||||
|
|
||||||
coreutils: \
|
coreutils: \
|
||||||
filesystem/bin/cat \
|
filesystem/bin/cat \
|
||||||
|
|
|
@ -11,6 +11,8 @@ pub fn main() {
|
||||||
let sh = args.next().expect("login: no sh provided");
|
let sh = args.next().expect("login: no sh provided");
|
||||||
let sh_args: Vec<String> = args.collect();
|
let sh_args: Vec<String> = args.collect();
|
||||||
|
|
||||||
|
env::set_current_dir("file:").expect("login: failed to cd to file:");
|
||||||
|
|
||||||
let _ = syscall::close(2);
|
let _ = syscall::close(2);
|
||||||
let _ = syscall::close(1);
|
let _ = syscall::close(1);
|
||||||
let _ = syscall::close(0);
|
let _ = syscall::close(0);
|
||||||
|
@ -26,9 +28,8 @@ pub fn main() {
|
||||||
command.arg(arg);
|
command.arg(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
command.env("HOME", "initfs:");
|
command.env("HOME", "file:home");
|
||||||
command.env("PWD", "initfs:bin");
|
command.env("PATH", "file:bin");
|
||||||
command.env("PATH", "initfs:bin");
|
|
||||||
command.env("COLUMNS", "80");
|
command.env("COLUMNS", "80");
|
||||||
command.env("LINES", "30");
|
command.env("LINES", "30");
|
||||||
command.env("TTY", &tty);
|
command.env("TTY", &tty);
|
||||||
|
|
Loading…
Reference in a new issue