confmod.sh 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. #
  3. # This program is free software; you can redistribute it and/or
  4. # modify it under the terms of the GNU General Public License
  5. # as published by the Free Software Foundation; either version 2
  6. # of the License, or (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program; if not, write to the Free Software
  15. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  16. # Your copy is available at: http://www.gnu.org/licenses/gpl.html
  17. TEMP=$(locate /etc/conf.modules); if [ -n "$TEMP" ]; then ln -s /etc/conf.modules /etc/modules.conf; fi
  18. TEMP=$(cat /etc/modules.conf | grep "alias ppp ppp_generic")
  19. if [ -n "$TEMP" ]; then
  20. grep -v "alias ppp ppp_generic" /etc/modules.conf > /etc/modules.conf1;
  21. mv -f /etc/modules.conf1 /etc/modules.conf
  22. fi
  23. TEMP=$(cat /etc/modules.conf | grep "alias char-major-108 off")
  24. if [ -n "$TEMP" ]; then
  25. grep -v "alias char-major-108 off" /etc/modules.conf > /etc/modules.conf1;
  26. mv -f /etc/modules.conf1 /etc/modules.conf
  27. fi
  28. TEMP=$(cat /etc/modules.conf | grep "alias char-major-108 ppp_generic")
  29. if [ -z "$TEMP" ]; then echo "alias char-major-108 ppp_generic" >> /etc/modules.conf; fi
  30. TEMP=$(cat /etc/modules.conf | grep "alias ppp-compress-18 ppp_mppe")
  31. if [ -z "$TEMP" ]; then echo "alias ppp-compress-18 ppp_mppe" >> /etc/modules.conf; fi
  32. TEMP=$(cat /etc/modules.conf | grep "alias ppp-compress-21 bsd_comp")
  33. if [ -z "$TEMP" ]; then echo "alias ppp-compress-21 bsd_comp" >> /etc/modules.conf; fi
  34. TEMP=$(cat /etc/modules.conf | grep "alias ppp-compress-24 ppp_deflate")
  35. if [ -z "$TEMP" ]; then echo "alias ppp-compress-24 ppp_deflate" >> /etc/modules.conf; fi
  36. TEMP=$(cat /etc/modules.conf | grep "alias ppp-compress-26 ppp_deflate")
  37. if [ -z "$TEMP" ]; then echo "alias ppp-compress-26 ppp_deflate" >> /etc/modules.conf; fi
  38. TEMP=$(cat /etc/modules.conf | grep "alias tty-ldisc-3 ppp_async")
  39. if [ "$TEMP" = "" ]; then echo "alias tty-ldisc-3 ppp_async" >> /etc/modules.conf; fi
  40. TEMP=$(cat /etc/modules.conf | grep "alias tty-ldisc-14 ppp_synctty")
  41. if [ -z "$TEMP" ]; then echo "alias tty-ldisc-14 ppp_synctty" >> /etc/modules.conf; fi