Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kernel/src/process/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ impl ProcessManager {
// The stack is now mapped, so we can write to it via physical addresses
let default_env: [&[u8]; 5] = [
b"PATH=/bin:/sbin:/usr/local/cbin\0",
b"HOME=/\0",
b"HOME=/home\0",
b"TERM=vt100\0",
b"USER=root\0",
b"SHELL=/bin/bsh\0",
Expand Down Expand Up @@ -2586,7 +2586,7 @@ impl ProcessManager {
// and write via the physical frames
let default_env: [&[u8]; 5] = [
b"PATH=/bin:/sbin:/usr/local/cbin\0",
b"HOME=/\0",
b"HOME=/home\0",
b"TERM=vt100\0",
b"USER=root\0",
b"SHELL=/bin/bsh\0",
Expand Down Expand Up @@ -2830,7 +2830,7 @@ impl ProcessManager {

let default_env: [&[u8]; 5] = [
b"PATH=/bin:/sbin:/usr/local/cbin\0",
b"HOME=/\0",
b"HOME=/home\0",
b"TERM=vt100\0",
b"USER=root\0",
b"SHELL=/bin/bsh\0",
Expand Down
42 changes: 42 additions & 0 deletions scripts/create_ext2_disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,27 @@ root:x:0:
nobody:x:65534:
GROUP

# Create /etc/bshrc - startup config for the bsh ECMAScript shell
cat > /mnt/ext2/etc/bshrc << 'BSHRC'
// Breenix Shell Configuration
// This file is evaluated as ECMAScript by bsh on startup.

// Global PATH - all standard binary directories
env("PATH", "/bin:/sbin:/usr/local/cbin");

// Home directory
env("HOME", "/root");

// Shell identification
env("SHELL", "/bin/bsh");

// Hostname
env("HOSTNAME", "breenix");

// Greeting
console.log("Welcome to Breenix OS");
BSHRC

# Create /tmp for filesystem write tests
mkdir -p /mnt/ext2/tmp

Expand Down Expand Up @@ -293,6 +314,27 @@ root:x:0:
nobody:x:65534:
GROUP

# Create /etc/bshrc - startup config for the bsh ECMAScript shell
cat > "$MOUNT_DIR/etc/bshrc" << 'BSHRC'
// Breenix Shell Configuration
// This file is evaluated as ECMAScript by bsh on startup.

// Global PATH - all standard binary directories
env("PATH", "/bin:/sbin:/usr/local/cbin");

// Home directory
env("HOME", "/root");

// Shell identification
env("SHELL", "/bin/bsh");

// Hostname
env("HOSTNAME", "breenix");

// Greeting
console.log("Welcome to Breenix OS");
BSHRC

# Create /tmp for filesystem write tests
mkdir -p "$MOUNT_DIR/tmp"

Expand Down
4 changes: 2 additions & 2 deletions userspace/programs/src/bsh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,10 @@ fn read_fd_to_string(fd: libbreenix::types::Fd) -> String {
fn default_path() -> String {
if let Ok(content) = std::fs::read_to_string("/proc/breenix/testing") {
if content.trim() == "1" {
return String::from("/bin:/usr/bin:/usr/local/test/bin");
return String::from("/bin:/sbin:/usr/local/cbin:/usr/local/test/bin");
}
}
String::from("/bin:/usr/bin")
String::from("/bin:/sbin:/usr/local/cbin")
}

/// Resolve a command name to a full path by searching PATH directories.
Expand Down
Loading
Loading