Quellcode durchsuchen

Use tlsdate from debian repos

The aforementioned bug should now be fixed
Bob Mottram vor 9 Jahren
Ursprung
Commit
1bf712abc3
1 geänderte Dateien mit 1 neuen und 95 gelöschten Zeilen
  1. 1
    95
      src/freedombone

+ 1
- 95
src/freedombone Datei anzeigen

@@ -91,9 +91,6 @@ DDNS_USERNAME=
91 91
 DDNS_PASSWORD=
92 92
 CURRENT_DDNS_DOMAIN=
93 93
 
94
-TLSDATE_REPO="https://github.com/ioerror/tlsdate.git"
95
-TLSDATE_COMMIT='ae396da167a9e43ce10c2db0956fb2e2b0d400ea'
96
-
97 94
 INADYN_REPO="https://github.com/bashrc/inadyn"
98 95
 INADYN_COMMIT='fadbe17f520d337dfb8d69ee4bf1fcaa23fce0d6'
99 96
 
@@ -867,12 +864,6 @@ function read_configuration {
867 864
       if grep -q "IPFS_COMMIT" $CONFIGURATION_FILE; then
868 865
           IPFS_COMMIT=$(grep "IPFS_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
869 866
       fi
870
-      if grep -q "TLSDATE_REPO" $CONFIGURATION_FILE; then
871
-          TLSDATE_REPO=$(grep "TLSDATE_REPO" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
872
-      fi
873
-      if grep -q "TLSDATE_COMMIT" $CONFIGURATION_FILE; then
874
-          TLSDATE_COMMIT=$(grep "TLSDATE_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
875
-      fi
876 867
       if grep -q "GNUSOCIAL_COMMIT" $CONFIGURATION_FILE; then
877 868
           GNUSOCIAL_COMMIT=$(grep "GNUSOCIAL_COMMIT" $CONFIGURATION_FILE | awk -F '=' '{print $2}')
878 869
       fi
@@ -6476,60 +6467,11 @@ function time_synchronisation {
6476 6467
       return
6477 6468
   fi
6478 6469
 
6479
-  # update to the next commit
6480
-  if [ -d $INSTALL_DIR/tlsdate ]; then
6481
-      if grep -q "tlsdate commit" $COMPLETION_FILE; then
6482
-          CURRENT_TLSDATE_COMMIT=$(grep "tlsdate commit" $COMPLETION_FILE | awk -F ':' '{print $2}')
6483
-          if [[ "$CURRENT_TLSDATE_COMMIT" != "$TLSDATE_COMMIT" ]]; then
6484
-              cd $INSTALL_DIR/tlsdate
6485
-              git stash
6486
-              git checkout master
6487
-              git pull
6488
-              git checkout $TLSDATE_COMMIT
6489
-              git checkout -b $TLSDATE_COMMIT
6490
-              sed -i "s/tlsdate commit.*/tlsdate commit:$TLSDATE_COMMIT/g" $COMPLETION_FILE
6491
-              ./autogen.sh
6492
-              ./configure
6493
-              make
6494
-              make install
6495
-              cp /usr/local/bin/tlsdate* /usr/bin
6496
-              cp /usr/local/sbin/tlsdate* /usr/bin
6497
-          fi
6498
-      else
6499
-          echo "tlsdate commit:$TLSDATE_COMMIT" >> $COMPLETION_FILE
6500
-      fi
6501
-  fi
6502
-
6503 6470
   if grep -Fxq "time_synchronisation" $COMPLETION_FILE; then
6504 6471
       return
6505 6472
   fi
6506
-  #apt-get -y install tlsdate
6507
-
6508
-  # building tlsdate from source is a workaround because of
6509
-  # this bug https://github.com/ioerror/tlsdate/issues/130
6510
-  apt-get -y install build-essential automake git pkg-config autoconf libtool libssl-dev libevent-dev
6511
-
6512
-  if [ ! -d $INSTALL_DIR ]; then
6513
-      mkdir $INSTALL_DIR
6514
-  fi
6515
-  cd $INSTALL_DIR
6516
-  git clone $TLSDATE_REPO
6517
-  cd $INSTALL_DIR/tlsdate
6518
-  git checkout $TLSDATE_COMMIT
6519
-  git checkout -b $TLSDATE_COMMIT
6520
-  if ! grep -q "tlsdate commit" $COMPLETION_FILE; then
6521
-      echo "tlsdate commit:$TLSDATE_COMMIT" >> $COMPLETION_FILE
6522
-  else
6523
-      sed -i "s/tlsdate commit.*/tlsdate commit:$TLSDATE_COMMIT/g" $COMPLETION_FILE
6524
-  fi
6525
-
6526
-  ./autogen.sh
6527
-  ./configure
6528
-  make
6529
-  make install
6530
-  cp /usr/local/bin/tlsdate* /usr/bin
6531
-  cp /usr/local/sbin/tlsdate* /usr/bin
6532 6473
 
6474
+  apt-get -y install tlsdate
6533 6475
   apt-get -y remove ntpdate
6534 6476
 
6535 6477
   echo '#!/bin/bash' > /usr/bin/updatedate
@@ -6607,42 +6549,6 @@ function time_synchronisation {
6607 6549
   echo '*/15           * *   *   *   root /usr/bin/updatedate' >> /etc/crontab
6608 6550
   service cron restart
6609 6551
 
6610
-  echo '#!/bin/bash' > /etc/init.d/tlsdate
6611
-  echo '# /etc/init.d/tlsdate' >> /etc/init.d/tlsdate
6612
-  echo '### BEGIN INIT INFO' >> /etc/init.d/tlsdate
6613
-  echo '# Provides:          tlsdate' >> /etc/init.d/tlsdate
6614
-  echo '# Required-Start:    $remote_fs $syslog' >> /etc/init.d/tlsdate
6615
-  echo '# Required-Stop:     $remote_fs $syslog' >> /etc/init.d/tlsdate
6616
-  echo '# Default-Start:     2 3 4 5' >> /etc/init.d/tlsdate
6617
-  echo '# Default-Stop:      0 1 6' >> /etc/init.d/tlsdate
6618
-  echo '# Short-Description: Initially calls tlsdate with the timewarp option' >> /etc/init.d/tlsdate
6619
-  echo '# Description:       Initially calls tlsdate with the timewarp option' >> /etc/init.d/tlsdate
6620
-  echo '### END INIT INFO' >> /etc/init.d/tlsdate
6621
-  echo '# Author: Bob Mottram <bob@robotics.uk.to>' >> /etc/init.d/tlsdate
6622
-  echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin"' >> /etc/init.d/tlsdate
6623
-  echo 'LOGFILE="/var/log/tlsdate.log"' >> /etc/init.d/tlsdate
6624
-  echo 'TLSDATECOMMAND="tlsdate --timewarp -l -H www.ptb.de -p 443 >> $LOGFILE"' >> /etc/init.d/tlsdate
6625
-  echo '#Start-Stop here' >> /etc/init.d/tlsdate
6626
-  echo 'case "$1" in' >> /etc/init.d/tlsdate
6627
-  echo '  start)' >> /etc/init.d/tlsdate
6628
-  echo '    echo "tlsdate started"' >> /etc/init.d/tlsdate
6629
-  echo '    $TLSDATECOMMAND' >> /etc/init.d/tlsdate
6630
-  echo '    ;;' >> /etc/init.d/tlsdate
6631
-  echo '  stop)' >> /etc/init.d/tlsdate
6632
-  echo '    echo "tlsdate stopped"' >> /etc/init.d/tlsdate
6633
-  echo '    ;;' >> /etc/init.d/tlsdate
6634
-  echo '  restart)' >> /etc/init.d/tlsdate
6635
-  echo '    echo "tlsdate restarted"' >> /etc/init.d/tlsdate
6636
-  echo '    $TLSDATECOMMAND' >> /etc/init.d/tlsdate
6637
-  echo '    ;;' >> /etc/init.d/tlsdate
6638
-  echo '    *)' >> /etc/init.d/tlsdate
6639
-  echo '  echo "Usage: $0 {start|stop|restart}"' >> /etc/init.d/tlsdate
6640
-  echo '  exit 1' >> /etc/init.d/tlsdate
6641
-  echo '  ;;' >> /etc/init.d/tlsdate
6642
-  echo 'esac' >> /etc/init.d/tlsdate
6643
-  echo 'exit 0' >> /etc/init.d/tlsdate
6644
-  chmod +x /etc/init.d/tlsdate
6645
-  update-rc.d tlsdate defaults
6646 6552
   echo 'time_synchronisation' >> $COMPLETION_FILE
6647 6553
 }
6648 6554