home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110502.etc.tar.gz / bradford.20110502.etc.tar / etc / NetworkManager / dispatcher.d / netcontrol_services < prev    next >
Text File  |  2006-06-02  |  1KB  |  38 lines

  1. #! /bin/bash
  2. #
  3. # Copyright (c) 2002-2006 SuSE Linux AG Nuernberg, Germany.
  4. # All rights reserved.
  5. #
  6. # This program is free software; you can redistribute it and/or modify it under
  7. # the terms of the GNU General Public License as published by the Free Software
  8. # Foundation; either version 2 of the License, or (at your option) any later
  9. # version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but WITHOUT
  12. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  14. # details.
  15. #
  16. # You should have received a copy of the GNU General Public License along with
  17. # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  18. # Place, Suite 330, Boston, MA 02111-1307 USA
  19. #
  20. # Author: Christian Zoz <zoz@suse.de>
  21. #
  22. # $Id: $
  23. #
  24. # Description:
  25. # This scripts starts or stops services which have start/stop links in
  26. # /etc/sysconfig/network/ifservices[-<interface>[-<essid>]]. See manpage
  27. # ifservices.5 for details.
  28. # Note that services are stopped always _after_ the interface is down. Stopping
  29. # services earlier would require a change in NetworkManager itself.
  30.  
  31. cd /etc/sysconfig/network/ || exit
  32. test -r ./config && . ./config
  33. test -r scripts/functions && . scripts/functions
  34.  
  35. E="`iwconfig ${1} 2>/dev/null | sed -n 's/^.*ESSID:\"\(.*\)\".*$/\1/p'`"
  36. info_mesg "calling 'if${2}-services ${1}${E:+-$E}'"
  37. scripts/if${2}-services "${1}${E:+-$E}"
  38.