Browse Source

Rene Rebe:


			
			
				rocklinux
			
			
		
Rene Rebe 21 years ago
parent
commit
c88336352a
3 changed files with 19 additions and 3 deletions
  1. +3
    -3
      package/base/sysfiles/ifup.sh
  2. +10
    -0
      package/base/sysfiles/rocknet.sh
  3. +6
    -0
      package/base/sysfiles/rocknet_modules_base.sh

+ 3
- 3
package/base/sysfiles/ifup.sh

@ -1,11 +1,11 @@
#!/bin/sh
useage() {
echo "Useage: $0 interface [ profile ]"
usage() {
echo "Usage: $0 interface [ profile ]"
exit 1
}
[ "$1" ] || useage
[ "$1" ] || usage
if [ "$2" = "" ] ; then
profile="`cat /etc/network/profile 2> /dev/null`"

+ 10
- 0
package/base/sysfiles/rocknet.sh

@ -23,6 +23,9 @@ profile=$1
interface=$2
mode=$3
pmatched=0 # some profile matched ?
imatched=0 # some interface matched ?
#
# addcode mode major-priority minor-priority code1
#
@ -54,6 +57,10 @@ error() {
echo "$*"
}
status() {
echo "$*"
}
for x in "$rocknet_base"/modules/*.sh; do . "$x"; done
while read cmd para
@ -81,3 +88,6 @@ done < <(
done | sort
)
[ "$pmatched" = 0 ] && error "Unknown profile: $profile"
[ "$imatched" = 0 ] && error "Unknown interface for profile: $interface"

+ 6
- 0
package/base/sysfiles/rocknet_modules_base.sh

@ -30,6 +30,7 @@ public_interface() {
for x in $prof; do
[ "$x" = "$profile" ] && ignore=0
done
[ "$ignore" = 0 ] && pmatched=1
fi
if [ "$ignore" = 0 ]; then
@ -42,5 +43,10 @@ public_interface() {
[ "$if" = "$interface" ] || ignore=1
fi
fi
if [ "$ignore" = 0 ] ; then
imatched=1
status "Interface / profile matched: $if($prof)"
fi
}

Loading…
Cancel
Save