summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-11 21:35:03 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-09-11 21:35:03 +0000
commitf4a0466de8aebccfe4efdb150452ab6852a67582 (patch)
tree39cd1b7fbfccfe515803025e7b45ea87fbcec95a
parent978a5fb741f4278f4f9296e0973b5fe6aa6dbb96 (diff)
[package] base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands on init without creating custom init scripts
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17571 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/base-files/Makefile2
-rwxr-xr-xpackage/base-files/files/etc/init.d/done5
-rw-r--r--package/base-files/files/etc/rc.local4
3 files changed, 10 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 2f1ddd962..4661a5a57 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -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/
diff --git a/package/base-files/files/etc/init.d/done b/package/base-files/files/etc/init.d/done
index 0640b6193..827866912 100755
--- a/package/base-files/files/etc/init.d/done
+++ b/package/base-files/files/etc/init.d/done
@@ -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
index 000000000..56394773c
--- /dev/null
+++ b/package/base-files/files/etc/rc.local
@@ -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