mirror of
https://github.com/rworkman/slackpkg
synced 2024-12-26 21:58:27 +01:00
slackpkg: Abort if system date is near epoch
This merges slackpkg-quit-on-epoch.patch from Slackware ARM
This commit is contained in:
parent
d426faa6e7
commit
4e7a7c9ebb
1 changed files with 17 additions and 0 deletions
|
@ -22,6 +22,23 @@
|
|||
# Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br
|
||||
#
|
||||
|
||||
# Ensure that we're not at the epoch. slackpkg breaks with GPG checks when
|
||||
# the date is so far in the past:
|
||||
if [ $( date +%s ) -le 1437841588 ]; then
|
||||
cat <<"EOF"
|
||||
Error: Your system date is wrong. slackpkg requires that the date be correct
|
||||
so that the package signatures can be verified.
|
||||
|
||||
The date may be incorrect because you have a system such as a Raspberry Pi that
|
||||
does does not have an RTC (Real Time Clock), or that the correct date was unable
|
||||
to be read from the RTC due to a driver bug, or a missing driver.
|
||||
|
||||
You may wish to set up NTP on your system:
|
||||
http://docs.slackware.com/howtos:network_services:ntp
|
||||
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#========================================================================
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue