ramips: set preinit interface to eth0 by default.
authorJohn Crispin <john@openwrt.org>
Thu, 25 Apr 2013 19:02:57 +0000 (19:02 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 25 Apr 2013 19:02:57 +0000 (19:02 +0000)
This makes any ramips device accessible via ethernet in failsafe mode.

Based on: https://dev.openwrt.org/changeset/36322

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Patchwork: http://patchwork.openwrt.org/patch/3567/
Acked-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 36434

target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips [new file with mode: 0644]

diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
new file mode 100644 (file)
index 0000000..c8b7f2a
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+. /lib/ramips.sh
+
+ramips_set_preinit_iface() {
+       ifname=eth0
+}
+
+boot_hook_add preinit_main ramips_set_preinit_iface