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