mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.6 KiB

  1. #!/bin/bash
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/scripts/Check-System
  11. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. if [ "$1" ] ; then
  25. echo "Usage: $0" ; exit 1
  26. fi
  27. found_error=0
  28. if [ "`date '+%Y'`" -lt 1990 ] ; then
  29. echo
  30. echo "Paranoia Check: Your clock is not set!"
  31. echo "Set you clock using the command: date MMDDhhmm[[CC]YY][.ss]"
  32. found_error=1
  33. fi
  34. if [ -z "`grep '^/' < /proc/swaps`" ] ; then
  35. echo
  36. echo "Paranoia Check: No active swap partition found!"
  37. echo "That can cause the build scripts to hang your system!. Activate"
  38. echo "a swap partition using the 'swapon' command and try again."
  39. found_error=1
  40. fi
  41. if [ -z "`type -p curl`" ] ; then
  42. echo
  43. echo "Paranoia Check: Program 'curl' not found!"
  44. echo "The curl utility is needed for Downloading the package"
  45. echo "source tars. Install the latest curl version."
  46. found_error=1
  47. fi
  48. if [ -z "`type -p bzip2`" ] ; then
  49. echo
  50. echo "Paranoia Check: Program 'bzip2' not found!"
  51. echo "The bzip2 utility is needed for extracting the package"
  52. echo "source tars. Install the latest bzip2 version."
  53. found_error=1
  54. fi
  55. case $BASH_VERSION in
  56. 2.05b*) ;;
  57. *) echo "The running bash version is not listed as supported version"
  58. echo "You need to update 'bash' to at least version 2.05b."
  59. found_error=1
  60. esac
  61. x="`mktemp -p /tmp 2> /dev/null`"
  62. if [ -z "$x" -o ! -f "$x" ] ; then
  63. echo
  64. echo "Paranoia Check: Program 'mktemp' not found or too old!"
  65. echo "You need an 'mktemp' installed which does know about the -p"
  66. echo "option. Install the latest mktemp version."
  67. found_error=1
  68. else
  69. rm -f "$x"
  70. fi
  71. if [ $found_error -ne 0 ] ; then
  72. echo
  73. echo "Paranoia Check found errors -> not doing anything."
  74. echo "You can disable the Paranoia Checks in the Config tool"
  75. echo "on your own risk!"
  76. echo
  77. fi
  78. exit $found_error