aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/default/etc/init.d/boot
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-15 21:03:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-15 21:03:30 +0000
commit8612d336918b408fd3abd844ccb8189f0d64acc5 (patch)
treedd043a8580746d6ee54912206a873228401c12f7 /package/base-files/default/etc/init.d/boot
parent6f8a93af7ef4eafdd3d6f678398e6f5df2a5560d (diff)
downloadupstream-8612d336918b408fd3abd844ccb8189f0d64acc5.tar.gz
upstream-8612d336918b408fd3abd844ccb8189f0d64acc5.tar.bz2
upstream-8612d336918b408fd3abd844ccb8189f0d64acc5.zip
init script cleanup, use /etc/rc.d/ for enabled scripts, /etc/init.d/<pkgname> (enable|disable) manages symlinks
SVN-Revision: 5128
Diffstat (limited to 'package/base-files/default/etc/init.d/boot')
-rwxr-xr-xpackage/base-files/default/etc/init.d/boot26
1 files changed, 26 insertions, 0 deletions
diff --git a/package/base-files/default/etc/init.d/boot b/package/base-files/default/etc/init.d/boot
new file mode 100755
index 0000000000..a5c8603a5d
--- /dev/null
+++ b/package/base-files/default/etc/init.d/boot
@@ -0,0 +1,26 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=10
+start() {
+ [ -f /proc/mounts ] || /sbin/mount_root
+ [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc
+ vconfig set_name_type DEV_PLUS_VID_NO_PAD
+
+ HOSTNAME=${wan_hostname%%.*}
+ echo ${HOSTNAME:=OpenWrt}>/proc/sys/kernel/hostname
+
+ mkdir -p /var/run
+ mkdir -p /var/log
+ mkdir -p /var/lock
+ touch /var/log/wtmp
+ touch /var/log/lastlog
+ [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
+
+ # manually trigger hotplug before loading modules
+ for iface in $(awk -F: '/:/ {print $1}' /proc/net/dev); do
+ /usr/bin/env -i ACTION=add INTERFACE="$iface" /sbin/hotplug net
+ done
+
+ load_modules /etc/modules /etc/modules.d/*
+}