Changeset 17859 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Mar 13, 2009 9:54:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/installer/vboxadd.sh
r17409 r17859 143 143 144 144 dev=/dev/vboxadd 145 userdev=/dev/vboxuser 145 146 owner=vboxadd 146 147 group=1 … … 173 174 rm -f $dev || { 174 175 fail "Cannot remove $dev" 176 } 177 178 rm -f $userdev || { 179 fail "Cannot remove $userdev" 175 180 } 176 181 … … 200 205 } 201 206 fi 207 if [ ! -c $userdev ]; then 208 maj=0 209 min=`sed -n 's;\([0-9]\+\) vboxuser;\1;p' /proc/misc` 210 if [ ! -z "$min" ]; then 211 maj=10 212 fi 213 test ! -z "$maj" && mknod -m 0666 $userdev c $maj $min || { 214 rm -f $dev 2>/dev/null 215 rmmod vboxadd 2>/dev/null 216 fail "Cannot create device $userdev with major $maj and minor $min" 217 } 218 fi 202 219 chown $owner:$group $dev 2>/dev/null || { 220 rm -f $dev 2>/dev/null 221 rm -f $userdev 2>/dev/null 203 222 rmmod vboxadd 2>/dev/null 204 223 fail "Cannot change owner $owner:$group for device $dev" 224 } 225 chown $owner:$group $userdev 2>/dev/null || { 226 rm -f $dev 2>/dev/null 227 rm -f $userdev 2>/dev/null 228 rmmod vboxadd 2>/dev/null 229 fail "Cannot change owner $owner:$group for device $userdev" 205 230 } 206 231 … … 240 265 if running_vboxadd; then 241 266 rmmod vboxadd 2>/dev/null || fail "Cannot unload module vboxadd" 267 rm -f $userdev || fail "Cannot unlink $userdev" 242 268 rm -f $dev || fail "Cannot unlink $dev" 243 269 fi
Note:
See TracChangeset
for help on using the changeset viewer.