Changeset 4315
- Timestamp:
- 08/23/07 16:32:48 (1 year ago)
- Files:
-
- trunk/debian/rules (modified) (1 diff)
- trunk/debian/vboxnet.init.tmpl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/debian/rules
r4310 r4315 183 183 sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge ucs1.3,$(debrel)),yes,)|g;' \ 184 184 debian/vboxdrv.init.tmpl > debian/vboxdrv.init 185 #sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge,$(debrel)),yes,)|g;' \185 sed -e 's|%NOLSB%|$(if $(filter _Debian_sarge,$(debrel)),yes,)|g;' \ 186 186 debian/vboxnet.init.tmpl > debian/vboxnet.init 187 187 dh_installinit --name=vboxdrv 188 #dh_installinit --name=vboxnet188 dh_installinit --name=vboxnet 189 189 if [ "$(debrel)" = "_Ubuntu_dapper" -o "$(debrel)" = "_Debian_sarge" ]; then \ 190 190 cat debian/postrm.dapper > debian/postrm; fi trunk/debian/vboxnet.init.tmpl
r4071 r4315 8 8 # Copyright (C) 2007 innotek GmbH 9 9 # 10 # This file is part of VirtualBox Open Source Edition (OSE), as 11 # available from http://www.virtualbox.org. This file is free software; 12 # you can redistribute it and/or modify it under the terms of the GNU 13 # General Public License as published by the Free Software Foundation, 14 # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE 15 # distribution. VirtualBox OSE is distributed in the hope that it will 16 # be useful, but WITHOUT ANY WARRANTY of any kind. 10 # innotek GmbH confidential 11 # All rights reserved 17 12 18 13 # chkconfig: 35 30 60 … … 91 86 start_network() { 92 87 log_action_begin_msg "Starting VirtualBox host networking" 93 # If there is no configuration file or if the service is already running, 94 # assume that we have successfully started. 95 if [ -f "$VARFILE" -o ! -f "$CONFIG" ]; then 88 # If the service is already running, return successfully. 89 if [ -f "$VARFILE" ]; then 96 90 log_action_end_msg 0 97 91 return 0 … … 105 99 if ! touch "$VARFILE" 2> /dev/null; then 106 100 failure "Cannot create $VARFILE" 101 fi 102 # If there is no configuration file, report success 103 if [ ! -f "$CONFIG" ]; then 104 log_action_end_msg 0 105 return 0 107 106 fi 108 107 # Fail if we can't read our configuration … … 127 126 then 128 127 # Try to create the interface 129 if (VBoxTunctl -t "$1" -u "$2" > /dev/null 2>&1 && 130 ifconfig "$1" up 2> /dev/null) 128 if VBoxTunctl -t "$1" -u "$2" > /dev/null 2>&1 131 129 then 132 # Add the interface to a bridge if one was specified 133 if [ ! -z "$3" ]; then 134 if brctl addif "$3" "$1" 2> /dev/null; then 135 echo "$1 $2 $3" > "$VARFILE" 130 # On SUSE Linux Enterprise Server, the interface does not 131 # appear immediately, so we loop trying to bring it up. 132 i=1 133 while [ $i -le 10 ] 134 do 135 ifconfig "$1" up 2> /dev/null 136 if ifconfig | grep "$1" > /dev/null 2>&1 137 then 138 # Add the interface to a bridge if one was specified 139 if [ ! -z "$3" ] 140 then 141 if brctl addif "$3" "$1" 2> /dev/null 142 then 143 echo "$1 $2 $3" > "$VARFILE" 144 else 145 echo "$1 $2" > "$VARFILE" 146 echo "Warning - failed to add interface $1 to the bridge $3" 147 fi 148 else 149 echo "$1 $2" > $VARFILE 150 fi 151 i=20 136 152 else 137 echo "$1 $2" > "$VARFILE"138 echo "Warning - failed to add interface $1 to the bridge $3"153 i=`expr $i + 1` 154 sleep .1 139 155 fi 140 else 141 echo "$1 $2" > $VARFILE 156 done 157 if [ $i -ne 20 ] 158 then 159 echo "Warning - failed to bring up the interface $1" 142 160 fi 143 161 else 144 echo 145 echo "Warning - invalid line in $CONFIG:" 146 echo " $line" 162 echo "Warning - failed to create the interface $1 for the user $2" 147 163 fi 148 164 else … … 157 173 if ls -g "$TAPDEV" 2>/dev/null | grep -q root; then 158 174 chgrp vboxusers "$TAPDEV" 175 chmod 0660 "$TAPDEV" 159 176 fi 160 177 log_action_end_msg 0

