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.

107 lines
3.2 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. if [ -z "`type -p makeinfo`" ] ; then
  56. echo
  57. echo "Paranoia Check: Program 'makeinfo' not found!"
  58. echo "The makeinfo program is needed for translating Texinfo"
  59. echo "documents. Please make sure that a current version of the"
  60. echo "texinfo package (including makeinfo) is installed on your system."
  61. found_error=1
  62. fi
  63. case $BASH_VERSION in
  64. 2.05b*) ;;
  65. *) echo "The running bash version is not listed as supported version"
  66. echo "You need to update 'bash' to at least version 2.05b."
  67. found_error=1
  68. esac
  69. x="`mktemp -p /tmp 2> /dev/null`"
  70. if [ -z "$x" -o ! -f "$x" ] ; then
  71. echo
  72. echo "Paranoia Check: Program 'mktemp' not found or too old!"
  73. echo "You need an 'mktemp' installed which does know about the -p"
  74. echo "option. Install the latest mktemp version."
  75. found_error=1
  76. else
  77. rm -f "$x"
  78. fi
  79. if [ -z "`type -p sed`" ] || ! sed -i s/a/b/ < /dev/null 2> /dev/null
  80. then
  81. echo
  82. echo "Paranoia Check: Program 'sed' not found or too old!"
  83. echo "You need a 'sed' installed which does know about the -i option"
  84. echo "(GNU/sed since 2001-09-25). Install the latest sed version."
  85. found_error=1
  86. fi
  87. if [ $found_error -ne 0 ] ; then
  88. echo
  89. echo "Paranoia Check found errors -> not doing anything."
  90. echo "You can disable the Paranoia Checks in the Config tool"
  91. echo "on your own risk!"
  92. echo
  93. fi
  94. exit $found_error