support busybox date.
Busybox date doesn't understand weekdays in -d input, so strip them beforehand.
This commit is contained in:
parent
37865c2c4a
commit
b43b8cacc8
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = sparc64-ieee1275 ];
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pdt="$(date -u +%s)"
|
pdt="$(date -u +%s)"
|
||||||
dt=`echo date | @builddir@/grub-shell`
|
dt=`echo date | @builddir@/grub-shell | sed 's, [A-Z][a-z]*$,,'`
|
||||||
dtg="$(date -u -d "$dt" +%s)"
|
dtg="$(date -u -d "$dt" +%s)"
|
||||||
ndt="$(date -u +%s)"
|
ndt="$(date -u +%s)"
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@ fi
|
||||||
# Compare RTC with interval timer.
|
# Compare RTC with interval timer.
|
||||||
# Not 100% proper but should check that timer is running ok
|
# Not 100% proper but should check that timer is running ok
|
||||||
dt=`echo 'date; sleep 10; date' | @builddir@/grub-shell`
|
dt=`echo 'date; sleep 10; date' | @builddir@/grub-shell`
|
||||||
dt1="$(date -u -d "$(echo "$dt" | head -n 1)" +%s)"
|
dt1="$(date -u -d "$(echo "$dt" | head -n 1 | sed 's, [A-Z][a-z]*$,,')" +%s)"
|
||||||
dt2="$(date -u -d "$(echo "$dt" | tail -n 1)" +%s)"
|
dt2="$(date -u -d "$(echo "$dt" | tail -n 1 | sed 's, [A-Z][a-z]*$,,')" +%s)"
|
||||||
|
|
||||||
# Ignore QEMU bug
|
# Ignore QEMU bug
|
||||||
if [ "${grub_modinfo_target_cpu}" = arm ] && [ $((dt2 - dt1)) -ge 15 ] && [ $((dt2 - dt1)) -le 17 ]; then
|
if [ "${grub_modinfo_target_cpu}" = arm ] && [ $((dt2 - dt1)) -ge 15 ] && [ $((dt2 - dt1)) -le 17 ]; then
|
||||||
|
|
Loading…
Reference in a new issue