Changeset 4072

Show
Ignore:
Timestamp:
01/17/09 14:52:22 (4 years ago)
Author:
Cyrus
Message:

Make fixtime more reliable

Location:
luci/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/contrib/package/luci/Makefile

    r4008 r4072  
    284284define Package/luci-admin-core/install 
    285285    $(call Package/luci/install/template,$(1),modules/admin-core) 
     286    touch $(1)/etc/init.d/luci_fixtime || true 
    286287endef 
    287288 
  • luci/trunk/modules/admin-core/root/etc/init.d/luci_fixtime

    r3395 r4072  
    66    cat <<' EOF' | lua -l luci.fs -l luci.util - 
    77        if (os.time() < 1000000000) then 
    8                 os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime(luci.util.libpath()))) 
     8            os.execute('date -s ' .. os.date('%m%d%H%M%Y', luci.fs.mtime("/etc/init.d/luci_fixtime"))) 
    99        end 
    1010    EOF