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.
 
 

38 lines
1.5 KiB

  1. #!/bin/bash
  2. # By Brielle Bruns <bruns@2mbit.com>
  3. # URL: http://www.sosdg.org/freestuff/firewall
  4. # License: GPLv3
  5. #
  6. # Copyright (C) 2009 - 2014 Brielle Bruns
  7. # Copyright (C) 2009 - 2014 The Summit Open Source Development Group
  8. #
  9. # This program is free software: you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation, either version 3 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. function load_kernel_modules {
  21. LOAD_MODULES=$1
  22. ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} loading"
  23. ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Loading kernel module:" N
  24. for i in $LOAD_MODULES; do
  25. ${debug} ${DebugColor} " ${DEFAULT_COLOR}${i}" N
  26. ${MODPROBE} ${i}
  27. done
  28. ${debug} ${DebugColor} "\n${FUNCNAME}:${DEFAULT_COLOR} done."
  29. }
  30. function sysctl_tweaks {
  31. ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} loading"
  32. if [ -e "${FWCONFIGDIR}/tweaks.conf" ]; then
  33. ${SYSCTL} -p "${FWCONFIGDIR}/tweaks.conf"
  34. fi
  35. ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} done"
  36. }