Browse Source

Rene Rebe:


			
			
				rocklinux
			
			
		
Rene Rebe 21 years ago
parent
commit
8434d0c13b
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      package/base/sysfiles/ifup.sh

+ 5
- 4
package/base/sysfiles/ifup.sh

@ -4,9 +4,9 @@ rocknet_tmp_base="/var/run/rocknet"
[ -d $rocknet_tmp_base ] || mkdir -p $rocknet_tmp_base
var_contains() {
local tmp;
local tmp
eval "tmp=\"\$$1\""
[ "${tmp/$3$2/}" != "$tmp" ]
}
@ -36,14 +36,15 @@ profile=${profile:-default}
if [ $force -eq 0 ] ; then
active_interfaces="`cat $rocknet_tmp_base/active-interfaces 2>/dev/null`"
if test $action = "up" && var_contains active_interfaces ',' "$1($profile)"
if test $action = "up" && var_contains active_interfaces ',' "$if($profile)"
then
echo "Interface $if($profile) is already listed active, it is probably a good idea to"
echo "take it down before activating it. Use -force to suppress this warning."
exit 2
fi
if test $action = "down" && ! var_contains active_interfaces ',' "$1($profile)"
if test $action = "down" && ! var_contains active_interfaces ',' "$if($profile)"
then
echo "Interface $if($profile) is not listed active, it is probably a good idea to"
echo "activate it before deactivating it. Use -force to suppress this warning."

Loading…
Cancel
Save