base-files: fix argument order to date in sysfixtime so that it also works with musl
authorFelix Fietkau <nbd@openwrt.org>
Sat, 7 Jun 2014 16:14:47 +0000 (16:14 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 7 Jun 2014 16:14:47 +0000 (16:14 +0000)
Seems like the reverse order relies on GNU specific getopt hackery which
musl does not replicate

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41045

package/base-files/files/etc/init.d/sysfixtime

index ca19e78e025bd389935fbbf8f5f1c58a5085d79c..4010e06f936f99ee03f4dfc569451a36b55545c7 100755 (executable)
@@ -5,7 +5,7 @@ START=00
 
 boot() {
        local curtime="$(date +%s)"
-       local maxtime="$(find /etc -type f -exec date +%s -r {} \; | sort -nr | head -n1)"
+       local maxtime="$(find /etc -type f -exec date -r {} +%s \; | sort -nr | head -n1)"
        [ $curtime -lt $maxtime ] && date -s @$maxtime
 }