/[baselayout]/branches/rc-scripts-1_6/net-scripts/net.modules.d/macchanger
Gentoo

Diff of /branches/rc-scripts-1_6/net-scripts/net.modules.d/macchanger

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 535 Revision 545
1# macchanger module for net-scripts 1# macchanger module for net-scripts
2# Version 0.6.2
2# Copyright 2004 Gentoo Foundation 3# Copyright (c) 2004 Gentoo Foundation
3# Distributed under the terms of the GNU General Public License v2 4# Distributed under the terms of the GNU General Public License V2
4# Contributed by Roy "UberLord" Marples <uberlord@rsm.demon.co.uk> 5# Contributed by Roy "UberLord" Marples (uberlord@rsm.demon.co.uk)
5# $Header$
6#
7# Based on code from Gentoo Linux /etc/init.d/net.eth0 version 1.45
8 6
9# char* macchanger_provides(void) 7# char* macchanger_provides(void)
10# 8#
11# Returns a string to change module definition for starting up 9# Returns a string to change module definition for starting up
12macchanger_provides() { 10macchanger_provides() {
13 echo "macchanger" 11 echo "macchanger"
14} 12}
15 13
16# char* macchanger_before(void) 14# void macchanger_depend(void)
17# 15#
18# Returns a space seperated array of modules this module should be loaded before 16# Sets up the dependancies for the module
19macchanger_before() { 17macchanger_depend() {
20 echo "interface" 18 before interface wireless
19 need interface
21} 20}
22 21
23# bool macchanger_check_installed(void) 22# bool macchanger_check_installed(void)
24# 23#
25# Returns 1 if macchanger is installed, otherwise 0 24# Returns 1 if macchanger is installed, otherwise 0
29 return 1 28 return 1
30} 29}
31 30
32# bool macchanger_check_depends(void) 31# bool macchanger_check_depends(void)
33# 32#
34# Checks to see if we have the necessary package installed 33# Checks to see if we have the needed functions
35# and the handler supports the necessary functionality
36macchanger_check_depends() { 34macchanger_check_depends() {
37 local e 35 local e
38 36
39 [[ -z ${e} && function != $( type -t interface_get_mac_address ) ]] && e=interface_get_mac_address 37 [[ -z ${e} && function != $( type -t interface_get_mac_address ) ]] && e=interface_get_mac_address
40 [[ -z ${e} ]] && return 0 38 [[ -z ${e} ]] && return 0

Legend:
Removed from v.535  
changed lines
  Added in v.545

  ViewVC Help
Powered by ViewVC 1.1.20