diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-09-11 21:35:03 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-09-11 21:35:03 +0000 |
commit | bdaeaafbef1d931b313cae1046ff5ccb5004e4b9 (patch) | |
tree | 3da3016df32074d6fd32952c058c93f22f1fa946 /package | |
parent | 1a60ab36d9f9ad8a4f1b0db3ebd9c5c2ba758232 (diff) | |
download | mtk-20170518-bdaeaafbef1d931b313cae1046ff5ccb5004e4b9.zip mtk-20170518-bdaeaafbef1d931b313cae1046ff5ccb5004e4b9.tar.gz mtk-20170518-bdaeaafbef1d931b313cae1046ff5ccb5004e4b9.tar.bz2 |
base-files: introduce a ready-to-use /etc/rc.local to let users run custom commands on init without creating custom init scripts
SVN-Revision: 17571
Diffstat (limited to 'package')
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rwxr-xr-x | package/base-files/files/etc/init.d/done | 5 | ||||
-rw-r--r-- | package/base-files/files/etc/rc.local | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2f1ddd9..4661a5a 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 0640b61..8278669 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 0000000..5639477 --- /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 |