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