summaryrefslogtreecommitdiffhomepage
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/package/luci-addons/Makefile2
-rw-r--r--contrib/package/luci-addons/dist/etc/init.d/inittime6
2 files changed, 8 insertions, 0 deletions
diff --git a/contrib/package/luci-addons/Makefile b/contrib/package/luci-addons/Makefile
index 3428eb068..cc23e7e9c 100644
--- a/contrib/package/luci-addons/Makefile
+++ b/contrib/package/luci-addons/Makefile
@@ -25,10 +25,12 @@ define Package/luci-addons/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/crontabs
+ $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./dist/usr/bin/run-parts $(1)/usr/bin
$(INSTALL_BIN) ./dist/sbin/luci-flash $(1)/sbin
+ $(INSTALL_BIN) ./dist/etc/init.d/inittime $(1)/etc/init.d
$(CP) ./dist/etc/crontabs/root $(1)/etc/crontabs/root
$(CP) ./dist/etc/hotplug.d/iface/20-aliases $(1)/etc/hotplug.d/iface/20-aliases
diff --git a/contrib/package/luci-addons/dist/etc/init.d/inittime b/contrib/package/luci-addons/dist/etc/init.d/inittime
new file mode 100644
index 000000000..70ddb5ca9
--- /dev/null
+++ b/contrib/package/luci-addons/dist/etc/init.d/inittime
@@ -0,0 +1,6 @@
+#!/bin/sh /etc/rc.common
+START=30
+
+start() {
+ lua -e "os.execute('date -s '..os.date('%m%d%H%M%Y', require('posix').stat('$0', 'mtime')))"
+}