aboutsummaryrefslogtreecommitdiff
path: root/sys/start
blob: b36cde297436105b0235aea27ed18c47dff5339e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /pkg/prog-bootstrap/bin/sh

# This directory contains nix.
export PATH=/pkg/sys/bin

# Add in the utilities needed for booting.
export PATH=$PATH:`nix getpkg 5703121fe19cbeeaee7edd659cf4a25b`/bin

echo
echo Starting up...

echo Mounting file systems...
mount -n -o remount,rw /dev/root /
mount -n -t proc none /proc
mount -n -t hostfs none /mnt/host 

echo Registering available sources...
( if cd /src; then
    for i in *; do
      nix reg $i
    done
  fi
)

export PATH=`nix getpkg coreutils-4.5.7`/bin:$PATH

echo
echo "=== starting interactive shell ==="

sh

echo
echo Shutting down...

umount /proc
#sync
mount -n -o remount,ro /dev/root /
#sync