summaryrefslogtreecommitdiffstats
path: root/package/base-files/files.old/etc
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files.old/etc')
-rw-r--r--package/base-files/files.old/etc/hotplug2-common.rules43
-rw-r--r--package/base-files/files.old/etc/hotplug2-init.rules5
-rwxr-xr-xpackage/base-files/files.old/etc/init.d/boot110
-rwxr-xr-xpackage/base-files/files.old/etc/init.d/rcS26
-rwxr-xr-xpackage/base-files/files.old/etc/init.d/watchdog13
-rw-r--r--package/base-files/files.old/etc/inittab4
-rwxr-xr-xpackage/base-files/files.old/etc/preinit43
-rwxr-xr-xpackage/base-files/files.old/etc/watchdog13
8 files changed, 257 insertions, 0 deletions
diff --git a/package/base-files/files.old/etc/hotplug2-common.rules b/package/base-files/files.old/etc/hotplug2-common.rules
new file mode 100644
index 000000000..c284f8f3f
--- /dev/null
+++ b/package/base-files/files.old/etc/hotplug2-common.rules
@@ -0,0 +1,43 @@
+
+# uncomment me to log hotplug events
+# DEVPATH is set {
+# exec logger -s -t hotplug -p daemon.info "name=%DEVNAME%, path=%DEVPATH%"
+# }
+
+$include /etc/hotplug2-platform.rules
+
+DEVNAME ~~ (^null$|^full$|^ptmx$|^zero$|^gpio|^hvc) {
+ makedev /dev/%DEVNAME% 0666
+ next-event
+}
+
+DEVNAME == mapper/control {
+ makedev /dev/%DEVNAME% 0600
+ next-event
+}
+
+ACTION == add, DEVPATH is set {
+ makedev /dev/%DEVNAME% 0644
+}
+
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^tty {
+ chmod 0666 /dev/%DEVNAME%
+}
+
+ACTION == add, DEVPATH is set, DEVNAME ~~ ^ppp {
+ chmod 0600 /dev/%DEVNAME%
+}
+
+ACTION == remove, DEVPATH is set, MAJOR is set, MINOR is set {
+ remove /dev/%DEVNAME%
+}
+
+FIRMWARE is set, ACTION == add {
+ exec /sbin/hotplug-call firmware
+ load-firmware /lib/firmware
+ next-event
+}
+
+SUBSYSTEM == platform {
+ exec /sbin/hotplug-call %SUBSYSTEM%
+}
diff --git a/package/base-files/files.old/etc/hotplug2-init.rules b/package/base-files/files.old/etc/hotplug2-init.rules
new file mode 100644
index 000000000..f01169776
--- /dev/null
+++ b/package/base-files/files.old/etc/hotplug2-init.rules
@@ -0,0 +1,5 @@
+$include /etc/hotplug2-common.rules
+
+SUBSYSTEM == button {
+ exec kill -USR1 1
+}
diff --git a/package/base-files/files.old/etc/init.d/boot b/package/base-files/files.old/etc/init.d/boot
new file mode 100755
index 000000000..005c4ad6f
--- /dev/null
+++ b/package/base-files/files.old/etc/init.d/boot
@@ -0,0 +1,110 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006-2011 OpenWrt.org
+
+START=10
+STOP=98
+
+system_config() {
+ local cfg="$1"
+
+ local hostname conloglevel timezone
+
+ config_get hostname "$cfg" hostname 'OpenWrt'
+ echo "$hostname" > /proc/sys/kernel/hostname
+
+ config_get conloglevel "$cfg" conloglevel
+ config_get buffersize "$cfg" buffersize
+ [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
+
+ config_get timezone "$cfg" timezone 'UTC'
+ echo "$timezone" > /tmp/TZ
+
+ config_get zonename "$cfg" zonename
+ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && ln -s "/usr/share/zoneinfo/$zonename" /tmp/localtime
+
+ # apply timezone to kernel
+ date -k
+
+ if [ -x /sbin/syslogd ]; then
+ local args log_ip log_size log_port log_type log_file
+ config_get log_ip "$cfg" log_ip
+ config_get log_size "$cfg" log_size 16
+ config_get log_port "$cfg" log_port 514
+ config_get log_type "$cfg" log_type circular
+ config_get log_file "$cfg" log_file "/var/log/messages"
+ args="${log_ip:+-L -R ${log_ip}:${log_port}} ${conloglevel:+-l $conloglevel}"
+ if [ "$log_type" = "file" ]; then
+ args="$args -s $log_size -O $log_file -S"
+ else
+ args="$args -C${log_size}"
+ fi
+ service_start /sbin/syslogd $args
+ fi
+ if [ -x /sbin/klogd ]; then
+ config_get klogconloglevel "$cfg" klogconloglevel
+ args="${klogconloglevel:+-c $klogconloglevel}"
+ service_start /sbin/klogd $args
+ fi
+}
+
+apply_uci_config() {
+ sh -c '. /lib/functions.sh; include /lib/config; uci_apply_defaults'
+}
+
+start() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ mkdir -p /var/state
+ mkdir -p /tmp/.uci
+ chmod 0700 /tmp/.uci
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ touch /tmp/resolv.conf.auto
+ ln -sf /tmp/resolv.conf.auto /tmp/resolv.conf
+ grep -q debugfs /proc/filesystems && mount -o noatime -t debugfs debugfs /sys/kernel/debug
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ load_modules /etc/modules.d/*
+
+ # allow wifi modules time to settle
+ sleep 1
+
+ /sbin/wifi detect > /tmp/wireless.tmp
+ [ -s /tmp/wireless.tmp ] && {
+ cat /tmp/wireless.tmp >> /etc/config/wireless
+ }
+ rm -f /tmp/wireless.tmp
+
+ apply_uci_config
+ config_load system
+ config_foreach system_config system
+
+ killall -q hotplug2
+ [ -x /sbin/hotplug2 ] && /sbin/hotplug2 --override --persistent \
+ --set-rules-file /etc/hotplug2.rules \
+ --set-coldplug-cmd /sbin/udevtrigger \
+ --max-children 1 >/dev/null 2>&1 &
+
+ # create /dev/root if it doesn't exist
+ [ -e /dev/root -o -h /dev/root ] || {
+ rootdev=$(awk 'BEGIN { RS=" "; FS="="; } $1 == "root" { print $2 }' < /proc/cmdline)
+ [ -n "$rootdev" ] && ln -s "$rootdev" /dev/root
+ }
+
+ # early sysctl to avoid networking races
+ if [ -d /proc/sys/net/ipv6/conf ]; then
+ for i in /proc/sys/net/ipv6/conf/*/accept_ra; do
+ echo 0 > $i
+ done
+ fi
+}
+
+stop() {
+ service_stop /sbin/klogd
+ service_stop /sbin/syslogd
+}
diff --git a/package/base-files/files.old/etc/init.d/rcS b/package/base-files/files.old/etc/init.d/rcS
new file mode 100755
index 000000000..3ec9bfef6
--- /dev/null
+++ b/package/base-files/files.old/etc/init.d/rcS
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+run_scripts() {
+ for i in /etc/rc.d/$1*; do
+ [ -x $i ] && $i $2 2>&1
+ done | $LOGGER
+}
+
+system_config() {
+ config_get_bool foreground $1 foreground 0
+}
+
+LOGGER="cat"
+[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
+
+. /lib/functions.sh
+
+config_load system
+config_foreach system_config system
+
+if [ "$1" = "S" -a "$foreground" != "1" ]; then
+ run_scripts "$1" "$2" &
+else
+ run_scripts "$1" "$2"
+fi
diff --git a/package/base-files/files.old/etc/init.d/watchdog b/package/base-files/files.old/etc/init.d/watchdog
new file mode 100755
index 000000000..299c89142
--- /dev/null
+++ b/package/base-files/files.old/etc/init.d/watchdog
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2011 OpenWrt.org
+
+START=97
+
+start() {
+ [ -c /dev/watchdog ] || return 1
+ [ -x /sbin/watchdog ] || return 1
+ service_start /sbin/watchdog -t 5 /dev/watchdog
+}
+stop() {
+ service_stop /sbin/watchdog
+}
diff --git a/package/base-files/files.old/etc/inittab b/package/base-files/files.old/etc/inittab
new file mode 100644
index 000000000..ca90fd8a2
--- /dev/null
+++ b/package/base-files/files.old/etc/inittab
@@ -0,0 +1,4 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+ttyS0::askfirst:/bin/ash --login
+tty1::askfirst:/bin/ash --login
diff --git a/package/base-files/files.old/etc/preinit b/package/base-files/files.old/etc/preinit
new file mode 100755
index 000000000..b237c2e06
--- /dev/null
+++ b/package/base-files/files.old/etc/preinit
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2010 Vertical Communications
+
+export PATH=/bin:/sbin:/usr/bin:/usr/sbin
+
+pi_ifname=
+pi_ip=192.168.1.1
+pi_broadcast=192.168.1.255
+pi_netmask=255.255.255.0
+
+fs_failsafe_ifname=
+fs_failsafe_ip=192.168.1.1
+fs_failsafe_broadcast=192.168.1.255
+fs_failsafe_netmask=255.255.255.0
+
+fs_failsafe_wait_timeout=2
+
+pi_suppress_stderr="y"
+pi_init_suppress_stderr="y"
+pi_init_path="/bin:/sbin:/usr/bin:/usr/sbin"
+pi_init_cmd="/sbin/init"
+
+. /lib/functions.sh
+
+boot_hook_init preinit_essential
+boot_hook_init preinit_main
+boot_hook_init failsafe
+boot_hook_init initramfs
+boot_hook_init preinit_mount_root
+
+for pi_source_file in /lib/preinit/*; do
+ . $pi_source_file
+done
+
+boot_run_hook preinit_essential
+
+pi_mount_skip_next=false
+pi_jffs2_mount_success=false
+pi_failsafe_net_message=false
+
+boot_run_hook preinit_main
+
diff --git a/package/base-files/files.old/etc/watchdog b/package/base-files/files.old/etc/watchdog
new file mode 100755
index 000000000..299c89142
--- /dev/null
+++ b/package/base-files/files.old/etc/watchdog
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2011 OpenWrt.org
+
+START=97
+
+start() {
+ [ -c /dev/watchdog ] || return 1
+ [ -x /sbin/watchdog ] || return 1
+ service_start /sbin/watchdog -t 5 /dev/watchdog
+}
+stop() {
+ service_stop /sbin/watchdog
+}