base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 11 Sep 2009 21:35:03 +0000 (21:35 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 11 Sep 2009 21:35:03 +0000 (21:35 +0000)
SVN-Revision: 17571

package/base-files/Makefile
package/base-files/files/etc/init.d/done
package/base-files/files/etc/rc.local [new file with mode: 0644]

index 2f1ddd962f18a2df80231602cea9ebe7ce5dcc65..4661a5a575eddeca6098f896e7e6b8796606a535 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=28
+PKG_RELEASE:=29
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 
index 0640b61938413fb563a9933f02f5a46ba0f39c09..82786691203b25ae91818d745e061d0cdf0198d0 100755 (executable)
@@ -9,6 +9,11 @@ boot() {
                lock -u /tmp/.switch2jffs
        }
 
+       # process user commands
+       [ -f /etc/rc.local ] && {
+               sh /etc/rc.local
+       }
+
        # set leds to normal state
        . /etc/diag.sh
        set_state done
diff --git a/package/base-files/files/etc/rc.local b/package/base-files/files/etc/rc.local
new file mode 100644 (file)
index 0000000..5639477
--- /dev/null
@@ -0,0 +1,4 @@
+# Put your custom commands here that should be executed once
+# the system init finished. By default this file does nothing.
+
+exit 0