From e9a11d9c98af8f0d03642cbd76d3c79a977048ba Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 1 Jun 2008 16:55:59 +0000 Subject: * Added time initialization init.d script to luci-addons --- contrib/package/luci-addons/Makefile | 2 ++ contrib/package/luci-addons/dist/etc/init.d/inittime | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 contrib/package/luci-addons/dist/etc/init.d/inittime diff --git a/contrib/package/luci-addons/Makefile b/contrib/package/luci-addons/Makefile index 3428eb068d..cc23e7e9c2 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 0000000000..70ddb5ca9d --- /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')))" +} -- cgit v1.2.3