File: linuxrc

package info (click to toggle)
dfsbuild 0.99.3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 308 kB
  • ctags: 6
  • sloc: haskell: 815; sh: 197; makefile: 99
file content (38 lines) | stat: -rw-r--r-- 828 bytes parent folder | download
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
#!/bin/sh

. /dfs_startup_funcs
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PATH
rootmnt=/realroot

echo "------------------------------------------------------------"
echo " *** Welcome to Debian From Scratch (DFS) ***"
echo "Initial RAM disk (format 2, without initramfs-tools) booting."
echo "------------------------------------------------------------"

echo Mounting proc
mount -n -t proc none /proc
echo Mounting sys
mount -n -t sysfs none /sys

sleep 5

if scandevices; then 
    sleep 5
    umount /sys
    umount /proc
    cd $rootmnt
    pivot_root . initrd
    echo " *** Now booting system from $DFSDEVICE ***"
    exec chroot . /sbin/init "$@"
else
    sleep 5
    umount /sys
    umount /proc
    echo ""
    echo "Could not find a DFS CD.  Terminating."
    sleep 60
    exit 1
fi