diff options
Diffstat (limited to 'package/base-files/files.old/lib/preinit')
25 files changed, 970 insertions, 0 deletions
diff --git a/package/base-files/files.old/lib/preinit/.svn/entries b/package/base-files/files.old/lib/preinit/.svn/entries new file mode 100644 index 0000000..def37f2 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/entries @@ -0,0 +1,436 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/base-files/files.old/lib/preinit +svn://svn.openwrt.org/openwrt + + + +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +10_essential_fs +file + + + + +2013-03-17T12:13:21.000000Z +9c15e362fa00b05d2bb18bcca1e65307 +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +607 + +30_device_fs_daemons +file + + + + +2013-03-17T12:13:21.000000Z +37a8eb0da658b97d50e8754b16670d8f +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +948 + +50_indicate_regular_preinit +file + + + + +2013-03-17T12:13:21.000000Z +a3ddeb98a9e57373d3245e3063955830 +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +282 + +50_choose_console +file + + + + +2013-03-17T12:13:21.000000Z +ffa607ae2d534e521b5c6273d3cdaa5a +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +766 + +99_10_run_init +file + + + + +2013-03-17T12:13:21.000000Z +93c0f80a6054bca387c09ee4e6f99f3a +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +379 + +10_indicate_preinit +file + + + + +2013-03-17T12:13:21.000000Z +b7620c301b089c9b6f8a609568248a36 +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +1182 + +20_device_fs_mount +file + + + + +2013-03-17T12:13:21.000000Z +97d976564787de8a1a52d8f45fedded4 +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +821 + +40_mount_devpts +file + + + + +2013-03-17T12:13:21.000000Z +59efcb6eb5436fa447a3b2497ec09c4c +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +312 + +60_init_hotplug +file + + + + +2013-03-17T12:13:21.000000Z +780b925ca1f5475b249ebd0abb09564c +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +196 + +80_mount_root +file + + + + +2013-03-17T12:13:21.000000Z +0733c44aa481aa9fdc689a6a75450127 +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +189 + +40_init_shm +file + + + + +2013-03-17T12:13:21.000000Z +a4946afc8f58103c9f9f3c125db6e49f +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +188 + +90_init_console +file + + + + +2013-03-17T12:13:21.000000Z +3e28746c996a5f8bab36246a8bd2910a +2013-03-13T18:11:19.892934Z +36003 +blogic + + + + + + + + + + + + + + + + + + + + + +265 + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/10_essential_fs.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/10_essential_fs.svn-base new file mode 100644 index 0000000..fc04eb7 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/10_essential_fs.svn-base @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_mount_procfs() { + mount -o noatime -t proc proc /proc +} + +do_mount_sysfs() { + mount -o noatime -tsysfs sysfs /sys +} + +calc_tmpfs_size() { + pi_size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>l)?mt-l:s}' /proc/meminfo) +} + +do_mount_tmpfs() { + calc_tmpfs_size + mount -o noatime -t tmpfs -o size=$pi_size,nosuid,nodev,mode=1777 tmpfs /tmp +} + +boot_hook_add preinit_essential do_mount_procfs +boot_hook_add preinit_essential do_mount_sysfs +boot_hook_add preinit_essential do_mount_tmpfs + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/10_indicate_preinit.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/10_indicate_preinit.svn-base new file mode 100644 index 0000000..4a0109c --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/10_indicate_preinit.svn-base @@ -0,0 +1,51 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +preinit_ip() { + # if the preinit interface isn't specified and ifname is set in + # preinit.arch use that interface + if [ -z "$pi_ifname" ]; then + pi_ifname=$ifname + fi + + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up + } +} + +preinit_ip_deconfig() { + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + ifconfig $pi_ifname 0.0.0.0 down + } +} + +preinit_net_echo() { + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + { + [ "$pi_preinit_net_messages" = "y" ] || { + [ "$pi_failsafe_net_message" = "true" ] && + [ "$pi_preinit_no_failsafe_netmsg" != "y" ] + } + } && netmsg $pi_broadcast "$1" + } +} + +preinit_echo() { + preinit_net_echo $1 + echo $1 +} + +pi_indicate_led() { + set_state preinit +} + +pi_indicate_preinit() { + echo "- preinit -" + preinit_net_echo "Doing OpenWRT Preinit\n" + pi_indicate_led +} + +boot_hook_add preinit_main preinit_ip +boot_hook_add preinit_main pi_indicate_preinit + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/20_device_fs_mount.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/20_device_fs_mount.svn-base new file mode 100644 index 0000000..7535b3f --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/20_device_fs_mount.svn-base @@ -0,0 +1,37 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_move_devtmpfs() { + local mnt="$(grep devtmpfs /proc/mounts)" + mnt="${mnt#* }"; mnt="${mnt%% *}" + + [ "$mnt" = "/dev" ] || mount -o noatime,move "$mnt" /dev +} + +do_mount_devfs() { + mount -o noatime -t devfs devfs /dev +} + +do_mount_hotplug() { + mount -t tmpfs -o noatime,mode=0755,size=512K tmpfs /dev +} + +do_mount_udev() { + mount -n -t tmpfs -o noatime,mode=0755 udev /dev +} + +choose_device_fs() { + if grep -q devtmpfs /proc/mounts; then + do_move_devtmpfs + elif grep -q devfs /proc/filesystems; then + do_mount_devfs + elif [ -x /sbin/hotplug2 ]; then + do_mount_hotplug + elif [ -x /sbin/udevd ]; then + do_mount_udev + fi +} + +boot_hook_add preinit_essential choose_device_fs + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/30_device_fs_daemons.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/30_device_fs_daemons.svn-base new file mode 100644 index 0000000..8379e5e --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/30_device_fs_daemons.svn-base @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (C) 2006-2013 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_devfs() { + HOTPLUG=/sbin/hotplug-call +} + +init_hotplug2() { + [ -c /dev/console ] || mknod /dev/console c 5 1 + /sbin/hotplug2 --set-rules-file /etc/hotplug2-init.rules --no-persistent --set-coldplug-cmd /sbin/udevtrigger + /sbin/hotplug2 --set-rules-file /etc/hotplug2-init.rules --persistent & +} + +init_udev() { + [ -d /lib/udev/devices ] && cp -af /lib/udev/devices/* /dev/ + [ -c /dev/console ] || mknod -m 0600 /dev/console c 5 1 + [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3 + /sbin/udevd --daemon --resolve-names=never + /sbin/udevadm trigger + /sbin/udevadm settle +} + +init_device_fs() { + HOTPLUG= + if grep -q devfs /proc/filesystems; then + init_devfs + elif [ -x /sbin/hotplug2 ]; then + init_hotplug2 + elif [ -x /sbin/udevd ]; then + init_udev + fi +} + +boot_hook_add preinit_essential init_device_fs + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/40_init_shm.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/40_init_shm.svn-base new file mode 100644 index 0000000..8971116 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/40_init_shm.svn-base @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_shm() { + [ -d /dev/shm ] || mkdir -p /dev/shm +} + +boot_hook_add preinit_essential init_shm + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/40_mount_devpts.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/40_mount_devpts.svn-base new file mode 100644 index 0000000..b55a7f2 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/40_mount_devpts.svn-base @@ -0,0 +1,15 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_devpts() { + [ -d /dev/pts ] || mkdir -p /dev/pts +} + +do_mount_devpts() { + mount -o noatime -t devpts devpts /dev/pts +} + +boot_hook_add preinit_essential init_devpts +boot_hook_add preinit_essential do_mount_devpts + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/50_choose_console.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/50_choose_console.svn-base new file mode 100644 index 0000000..ecbc2ea --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/50_choose_console.svn-base @@ -0,0 +1,31 @@ +#!/bin/sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +choose_console() { + # the shell really doesn't like having stdin/out closed + # that's why we use /dev/pty/m0 and m1 (or equivalent) as replacement + # for /dev/console if there's no serial console available + + if grep -q devfs /proc/filesystems; then + M0=/dev/pty/m0 + M1=/dev/pty/m1 + M2=/dev/pty/m1 + elif [ -x /sbin/hotplug2 ]; then + M0=/dev/ptmx + M1=/dev/ptmx + M2=/dev/ptmx + elif [ -x /sbin/udevd ]; then + M0=/dev/pty/ptmx + M1=/dev/pty/ptmx + M2=/dev/pty/ptmx + fi + dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && { + M0=/dev/console + M1=/dev/console + M2=/dev/console + } +} + +boot_hook_add preinit_essential choose_console + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/50_indicate_regular_preinit.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/50_indicate_regular_preinit.svn-base new file mode 100644 index 0000000..9cc01f2 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/50_indicate_regular_preinit.svn-base @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +indicate_regular_preinit() { + echo "- regular preinit -" + preinit_net_echo "Continuing with Regular Preinit\n" + pi_indicate_led +} + +boot_hook_add preinit_main indicate_regular_preinit + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/60_init_hotplug.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/60_init_hotplug.svn-base new file mode 100644 index 0000000..dc05e0e --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/60_init_hotplug.svn-base @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_hotplug() { + echo "$HOTPLUG" > /proc/sys/kernel/hotplug +} + +boot_hook_add preinit_main init_hotplug + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/80_mount_root.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/80_mount_root.svn-base new file mode 100644 index 0000000..ad24fb8 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/80_mount_root.svn-base @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_mount_root() { + boot_run_hook preinit_mount_root +} + +boot_hook_add preinit_main do_mount_root + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/90_init_console.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/90_init_console.svn-base new file mode 100644 index 0000000..ca05755 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/90_init_console.svn-base @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_console() { + if [ "$pi_suppress_stderr" = "y" ]; then + exec <$M0 >$M1 2>&0 + else + exec <$M0 >$M1 2>$M2 + fi +} + +boot_hook_add preinit_essential init_console + diff --git a/package/base-files/files.old/lib/preinit/.svn/text-base/99_10_run_init.svn-base b/package/base-files/files.old/lib/preinit/.svn/text-base/99_10_run_init.svn-base new file mode 100644 index 0000000..fef3a50 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/.svn/text-base/99_10_run_init.svn-base @@ -0,0 +1,16 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +run_init() { + preinit_echo "- init -" + preinit_ip_deconfig + if [ "$pi_init_suppress_stderr" = "y" ]; then + exec env - PATH=$pi_init_path $pi_init_env $pi_init_cmd 2>&0 + else + exec env - PATH=$pi_init_path $pi_init_env $pi_init_cmd + fi +} + +boot_hook_add preinit_main run_init + diff --git a/package/base-files/files.old/lib/preinit/10_essential_fs b/package/base-files/files.old/lib/preinit/10_essential_fs new file mode 100644 index 0000000..fc04eb7 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/10_essential_fs @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_mount_procfs() { + mount -o noatime -t proc proc /proc +} + +do_mount_sysfs() { + mount -o noatime -tsysfs sysfs /sys +} + +calc_tmpfs_size() { + pi_size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>l)?mt-l:s}' /proc/meminfo) +} + +do_mount_tmpfs() { + calc_tmpfs_size + mount -o noatime -t tmpfs -o size=$pi_size,nosuid,nodev,mode=1777 tmpfs /tmp +} + +boot_hook_add preinit_essential do_mount_procfs +boot_hook_add preinit_essential do_mount_sysfs +boot_hook_add preinit_essential do_mount_tmpfs + diff --git a/package/base-files/files.old/lib/preinit/10_indicate_preinit b/package/base-files/files.old/lib/preinit/10_indicate_preinit new file mode 100644 index 0000000..4a0109c --- /dev/null +++ b/package/base-files/files.old/lib/preinit/10_indicate_preinit @@ -0,0 +1,51 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +preinit_ip() { + # if the preinit interface isn't specified and ifname is set in + # preinit.arch use that interface + if [ -z "$pi_ifname" ]; then + pi_ifname=$ifname + fi + + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up + } +} + +preinit_ip_deconfig() { + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + ifconfig $pi_ifname 0.0.0.0 down + } +} + +preinit_net_echo() { + [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { + { + [ "$pi_preinit_net_messages" = "y" ] || { + [ "$pi_failsafe_net_message" = "true" ] && + [ "$pi_preinit_no_failsafe_netmsg" != "y" ] + } + } && netmsg $pi_broadcast "$1" + } +} + +preinit_echo() { + preinit_net_echo $1 + echo $1 +} + +pi_indicate_led() { + set_state preinit +} + +pi_indicate_preinit() { + echo "- preinit -" + preinit_net_echo "Doing OpenWRT Preinit\n" + pi_indicate_led +} + +boot_hook_add preinit_main preinit_ip +boot_hook_add preinit_main pi_indicate_preinit + diff --git a/package/base-files/files.old/lib/preinit/20_device_fs_mount b/package/base-files/files.old/lib/preinit/20_device_fs_mount new file mode 100644 index 0000000..7535b3f --- /dev/null +++ b/package/base-files/files.old/lib/preinit/20_device_fs_mount @@ -0,0 +1,37 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_move_devtmpfs() { + local mnt="$(grep devtmpfs /proc/mounts)" + mnt="${mnt#* }"; mnt="${mnt%% *}" + + [ "$mnt" = "/dev" ] || mount -o noatime,move "$mnt" /dev +} + +do_mount_devfs() { + mount -o noatime -t devfs devfs /dev +} + +do_mount_hotplug() { + mount -t tmpfs -o noatime,mode=0755,size=512K tmpfs /dev +} + +do_mount_udev() { + mount -n -t tmpfs -o noatime,mode=0755 udev /dev +} + +choose_device_fs() { + if grep -q devtmpfs /proc/mounts; then + do_move_devtmpfs + elif grep -q devfs /proc/filesystems; then + do_mount_devfs + elif [ -x /sbin/hotplug2 ]; then + do_mount_hotplug + elif [ -x /sbin/udevd ]; then + do_mount_udev + fi +} + +boot_hook_add preinit_essential choose_device_fs + diff --git a/package/base-files/files.old/lib/preinit/30_device_fs_daemons b/package/base-files/files.old/lib/preinit/30_device_fs_daemons new file mode 100644 index 0000000..8379e5e --- /dev/null +++ b/package/base-files/files.old/lib/preinit/30_device_fs_daemons @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (C) 2006-2013 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_devfs() { + HOTPLUG=/sbin/hotplug-call +} + +init_hotplug2() { + [ -c /dev/console ] || mknod /dev/console c 5 1 + /sbin/hotplug2 --set-rules-file /etc/hotplug2-init.rules --no-persistent --set-coldplug-cmd /sbin/udevtrigger + /sbin/hotplug2 --set-rules-file /etc/hotplug2-init.rules --persistent & +} + +init_udev() { + [ -d /lib/udev/devices ] && cp -af /lib/udev/devices/* /dev/ + [ -c /dev/console ] || mknod -m 0600 /dev/console c 5 1 + [ -c /dev/null ] || mknod -m 0666 /dev/null c 1 3 + /sbin/udevd --daemon --resolve-names=never + /sbin/udevadm trigger + /sbin/udevadm settle +} + +init_device_fs() { + HOTPLUG= + if grep -q devfs /proc/filesystems; then + init_devfs + elif [ -x /sbin/hotplug2 ]; then + init_hotplug2 + elif [ -x /sbin/udevd ]; then + init_udev + fi +} + +boot_hook_add preinit_essential init_device_fs + diff --git a/package/base-files/files.old/lib/preinit/40_init_shm b/package/base-files/files.old/lib/preinit/40_init_shm new file mode 100644 index 0000000..8971116 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/40_init_shm @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_shm() { + [ -d /dev/shm ] || mkdir -p /dev/shm +} + +boot_hook_add preinit_essential init_shm + diff --git a/package/base-files/files.old/lib/preinit/40_mount_devpts b/package/base-files/files.old/lib/preinit/40_mount_devpts new file mode 100644 index 0000000..b55a7f2 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/40_mount_devpts @@ -0,0 +1,15 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_devpts() { + [ -d /dev/pts ] || mkdir -p /dev/pts +} + +do_mount_devpts() { + mount -o noatime -t devpts devpts /dev/pts +} + +boot_hook_add preinit_essential init_devpts +boot_hook_add preinit_essential do_mount_devpts + diff --git a/package/base-files/files.old/lib/preinit/50_choose_console b/package/base-files/files.old/lib/preinit/50_choose_console new file mode 100644 index 0000000..ecbc2ea --- /dev/null +++ b/package/base-files/files.old/lib/preinit/50_choose_console @@ -0,0 +1,31 @@ +#!/bin/sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +choose_console() { + # the shell really doesn't like having stdin/out closed + # that's why we use /dev/pty/m0 and m1 (or equivalent) as replacement + # for /dev/console if there's no serial console available + + if grep -q devfs /proc/filesystems; then + M0=/dev/pty/m0 + M1=/dev/pty/m1 + M2=/dev/pty/m1 + elif [ -x /sbin/hotplug2 ]; then + M0=/dev/ptmx + M1=/dev/ptmx + M2=/dev/ptmx + elif [ -x /sbin/udevd ]; then + M0=/dev/pty/ptmx + M1=/dev/pty/ptmx + M2=/dev/pty/ptmx + fi + dd if=/dev/console of=/dev/null bs=1 count=0 >/dev/null 2>/dev/null && { + M0=/dev/console + M1=/dev/console + M2=/dev/console + } +} + +boot_hook_add preinit_essential choose_console + diff --git a/package/base-files/files.old/lib/preinit/50_indicate_regular_preinit b/package/base-files/files.old/lib/preinit/50_indicate_regular_preinit new file mode 100644 index 0000000..9cc01f2 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/50_indicate_regular_preinit @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +indicate_regular_preinit() { + echo "- regular preinit -" + preinit_net_echo "Continuing with Regular Preinit\n" + pi_indicate_led +} + +boot_hook_add preinit_main indicate_regular_preinit + diff --git a/package/base-files/files.old/lib/preinit/60_init_hotplug b/package/base-files/files.old/lib/preinit/60_init_hotplug new file mode 100644 index 0000000..dc05e0e --- /dev/null +++ b/package/base-files/files.old/lib/preinit/60_init_hotplug @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_hotplug() { + echo "$HOTPLUG" > /proc/sys/kernel/hotplug +} + +boot_hook_add preinit_main init_hotplug + diff --git a/package/base-files/files.old/lib/preinit/80_mount_root b/package/base-files/files.old/lib/preinit/80_mount_root new file mode 100644 index 0000000..ad24fb8 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/80_mount_root @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +do_mount_root() { + boot_run_hook preinit_mount_root +} + +boot_hook_add preinit_main do_mount_root + diff --git a/package/base-files/files.old/lib/preinit/90_init_console b/package/base-files/files.old/lib/preinit/90_init_console new file mode 100644 index 0000000..ca05755 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/90_init_console @@ -0,0 +1,14 @@ +#!/bin/sh +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +init_console() { + if [ "$pi_suppress_stderr" = "y" ]; then + exec <$M0 >$M1 2>&0 + else + exec <$M0 >$M1 2>$M2 + fi +} + +boot_hook_add preinit_essential init_console + diff --git a/package/base-files/files.old/lib/preinit/99_10_run_init b/package/base-files/files.old/lib/preinit/99_10_run_init new file mode 100644 index 0000000..fef3a50 --- /dev/null +++ b/package/base-files/files.old/lib/preinit/99_10_run_init @@ -0,0 +1,16 @@ +#!/bin/sh +# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2010 Vertical Communications + +run_init() { + preinit_echo "- init -" + preinit_ip_deconfig + if [ "$pi_init_suppress_stderr" = "y" ]; then + exec env - PATH=$pi_init_path $pi_init_env $pi_init_cmd 2>&0 + else + exec env - PATH=$pi_init_path $pi_init_env $pi_init_cmd + fi +} + +boot_hook_add preinit_main run_init + |