3 echo "pl_sysinit: bringing system online"
5 echo "pl_sysinit: mounting file systems"
8 echo "pl_sysinit: bringing loopback network device up"
9 /sbin/ifconfig lo 127.0.0.1 up
11 echo "pl_sysinit: invoking hardware initialization script"
14 echo "pl_sysinit: finding cd to mount on /usr"
15 test_devices=/sys/block/*
17 initrd_version=$(/bin/cat /pl_version)
20 for device in $test_devices; do
21 device=$(/bin/basename $device)
23 # skipping any devices that start with md or ra (ram) or lo (loop)
24 start_device=${device:0:2}
25 if [ "$start_device" == "ra" ] || [ "$start_device" == "md" ] ||
26 [ "$start_device" == "lo" ]; then
30 echo "pl_sysinit: checking $device for /usr contents"
31 /bin/mount -o ro -t iso9660 /dev/$device /usr 2>&1 > /dev/null
33 # it mounted, but we should probably make sure its our boot cd
34 # this can be done by making sure the /pl_version file (on initrd)
35 # matches /usr/isolinux/pl_version
36 cd_version=$(/bin/cat /usr/isolinux/pl_version)
38 if [ "$initrd_version" != "$cd_version" ]; then
39 # eh, wrong cd, keep trying
40 /bin/umount /usr 2>&1 /dev/null
42 echo "pl_sysinit: found cd and mounted on /usr"
49 if [ $mounted -eq 0 ]; then
50 echo "pl_sysinit: unable to find boot cdrom, cannot continue."
51 # todo: maybe we can put a staticly linked sshd here
56 # parts of this were copied from devmap_mknod.sh from the device-mapper
57 # source. Since fedora decided not to include it in the rpm, it is
59 echo "pl_sysinit: creating device mapper control node"
62 DM_NAME="device-mapper"
64 CONTROL="$DIR/control"
66 MAJOR=$(sed -n 's/^ *\([0-9]\+\) \+misc$/\1/p' /proc/devices)
67 MINOR=$(sed -n "s/^ *\([0-9]\+\) \+$DM_NAME\$/\1/p" /proc/misc)
69 if [ -n "$MAJOR" ] && [ -n "$MINOR" ]; then
70 /bin/mkdir -p --mode=755 $DIR
72 /bin/mknod --mode=600 $CONTROL c $MAJOR $MINOR
74 echo "pl_sysinit: unable to create device mapper control node, continuing"