From bdaeaafbef1d931b313cae1046ff5ccb5004e4b9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 11 Sep 2009 21:35:03 +0000 Subject: [PATCH] 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 --- package/base-files/Makefile | 2 +- package/base-files/files/etc/init.d/done | 5 +++++ package/base-files/files/etc/rc.local | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 package/base-files/files/etc/rc.local diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 2f1ddd962f..4661a5a575 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 0640b61938..8278669120 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 0000000000..56394773c3 --- /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 -- 2.30.2