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.

78 lines
1.6 KiB

  1. #!/bin/bash
  2. . scripts/functions
  3. if [ ! -e .config ] ; then
  4. echo "${bold}${red}No configuration found!${normal}"
  5. echo "run ./config.sh first!"
  6. exit 1
  7. fi
  8. . .config
  9. for x in create_lvpxml encrypted plain ; do
  10. . scripts/${x}
  11. done
  12. moviefiles="/tmp/lvp_moviefiles.$$"
  13. trap "rm -f ${moviefiles}" EXIT
  14. trap "exit 1" INT
  15. case "${LVP_SIZE}" in
  16. cd)
  17. size=700
  18. ;;
  19. dvd)
  20. size=4486
  21. ;;
  22. other)
  23. size=${LVP_SIZE_OTHER}
  24. ;;
  25. esac
  26. if ! eval "type=\${type_${LVP_TYPE}}" ; then
  27. echo "${bold}${red}Unknown type ${LVP_TYPE}${normal}"
  28. exit 1
  29. fi
  30. mplayer_param=${LVP_MPLAYER_OPTS}
  31. eval "for x in ${LVP_FILES} ; do echo \${x} ; done" >${moviefiles}
  32. echo "Verifying existence of files ... "
  33. error=0
  34. while read file ; do
  35. if [ ! -f "${file}" ] ; then
  36. echo "${file}: no such file or directory"
  37. error=$(( ${error} + 1 ))
  38. fi
  39. done < ${moviefiles}
  40. if [ ${error} -gt 0 ] ; then
  41. echo "Couldn't find ${error} file(s)."
  42. confirm "Continue without those files"
  43. [ ${?} -eq 1 ] && exit 1
  44. fi
  45. for module in twofish blowfish serpent ; do
  46. eval "encryption_${module}=0"
  47. modprobe loop_${module} >/dev/null 2>&1 && eval "encryption_${module}=1"
  48. done
  49. encryption_available=0
  50. [ ${encryption_twofish} -eq 1 -o ${encryption_blowfish} -eq 1 -o ${encryption_serpent} -eq 1 ] && encryption_available=1
  51. if [ ${encryption_available} -eq 0 ] ; then
  52. echo "Sorry, you do not have loop-aes on your system. Please have a look at"
  53. echo "http://loop-aes.sourceforge.net"
  54. exit 1
  55. fi
  56. eval "avail=\${encryption_${LVP_ENCRYPTION}}"
  57. if [ "${avail}" == "0" ] ; then
  58. echo "Sorry, ${LVP_ENCRYPTION} is not available on your system."
  59. exit 1
  60. fi
  61. eval "process_${LVP_TYPE}"