File: startup

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 (35 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

# Installed as /sbin/init on DFS CD

initrdloc=/initrd
newrdloc=/opt/dfsruntime/runtimemnt
newrdfiles=/opt/dfsruntime/runtimerd

if [ -f $newrdloc/etc/fstab ] ; then
    echo " *** DFS startup: system already running, calling real init"
    exec /sbin/init.real "$@"
    return 1
fi

echo ""
echo " *** Debian From Scratch CD initializing ***"
echo "PID: $$"
cd /

echo -n "Creating new runtime ramdisk: "
mount -n -t tmpfs none $newrdloc
echo $newrdloc

echo -n "Populating runtime ramdisk: "
cp -a $newrdfiles/* $newrdloc/
echo "done."

echo -n "Initializing configuration files: /etc/fstab"
echo "proc  /proc   proc    defaults        0 0" > /etc/fstab
echo "."

echo ""
echo " *** Now booting system ***"
exec /sbin/init.real "$@"