diff options
author | Steven Barth <steven@midlink.org> | 2008-06-01 16:55:59 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-06-01 16:55:59 +0000 |
commit | e9a11d9c98af8f0d03642cbd76d3c79a977048ba (patch) | |
tree | b12c63a236ce28170ccba9e01fa8fcfa054f7668 /contrib/package/luci-addons | |
parent | 47b62843fc944e8bfafa78348715bac0b948eb08 (diff) |
* Added time initialization init.d script to luci-addons
Diffstat (limited to 'contrib/package/luci-addons')
-rw-r--r-- | contrib/package/luci-addons/Makefile | 2 | ||||
-rw-r--r-- | contrib/package/luci-addons/dist/etc/init.d/inittime | 6 |
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')))" +} |