Revision 1ee6fad7

View differences:

util/install.sh
15 15
grep Ubuntu /etc/lsb-release &> /dev/null && DIST="Ubuntu"
16 16

  
17 17
# Kernel params
18
# These kernels have been tried:
19
<<<<<<< HEAD:util/install.sh
20
KERNEL_NAME=2.6.33.1-mininet
21
#KERNEL_NAME=`uname -r`
22
KERNEL_HEADERS=linux-headers-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
18

  
23 19
KERNEL_IMAGE=linux-image-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
24
=======
20

  
25 21
if [ "$DIST" = "Debian" ]; then
26 22
    KERNEL_NAME=2.6.33.1-mininet
27 23
    KERNEL_HEADERS=linux-headers-${KERNEL_NAME}_${KERNEL_NAME}-10.00.Custom_i386.deb
......
35 31
fi
36 32

  
37 33
echo "Detected Linux distribution: $DIST"
38
>>>>>>> of1.0:util/install.sh
39 34

  
40 35
# Kernel Deb pkg to be removed:
41 36
KERNEL_IMAGE_OLD=linux-image-2.6.26-2-686
......
161 156
        sudo apt-get -y --force-yes -t lenny-backports install autoconf
162 157
    fi
163 158

  
164
<<<<<<< HEAD:util/install.sh
165
=======
166 159
    if [ "$DIST" = "Ubuntu" ]; then
167 160
        sudo apt-get -y install $KERNEL_HEADERS
168 161
    fi
169 162

  
170
>>>>>>> of1.0:util/install.sh
171 163
	#Install OVS from release
172 164
	cd ~/
173
	#wget http://openvswitch.org/releases/${OVS_RELEASE}.tar.gz
174
	#tar xzf ${OVS_RELEASE}.tar.gz
175
	#cd $OVS_RELEASE
176 165
	git clone git://openvswitch.org/openvswitch
177 166
	cd $OVS_RELEASE
178 167
	./boot.sh
179
<<<<<<< HEAD:util/install.sh
180
	./configure --with-l26=/lib/modules/${KERNEL_NAME}/build
181
=======
182 168
    BUILDDIR=/lib/modules/${KERNEL_NAME}/build
183 169
    if [ ! -e $BUILDDIR ]; then
184 170
        echo "Creating build directory $BUILDDIR"
......
186 172
    fi
187 173
    opts="--with-l26=$BUILDDIR"
188 174
	./configure $opts
189
>>>>>>> of1.0:util/install.sh
190 175
	make
191 176
	sudo make install
192 177
}
......
214 199

  
215 200
	# With later autoconf versions this doesn't quite work:
216 201
	./boot.sh --apps-core || true
217
<<<<<<< HEAD:util/install.sh
218
	# So use this instead:
219
	autoreconf --install --force
220
=======
221 202
    if [ "$DIST" = "Debian" ]; then
222 203
        # So use this instead:
223 204
        autoreconf --install --force
224 205
    fi
225
>>>>>>> of1.0:util/install.sh
226 206
	mkdir build
227 207
	cd build
228 208
	../configure --with-python=yes
......
261 241
    git clone git://www.openflow.org/oflops.git
262 242
    cd oflops
263 243
    sh boot.sh
264
<<<<<<< HEAD:util/install.sh
265
    ./configure --with-openflow-src-dir=/home/mininet/openflow
266
=======
267 244
    ./configure --with-openflow-src-dir=$HOME/openflow
268
>>>>>>> of1.0:util/install.sh
269 245
    make
270 246
    sudo make install || true # make install fails; force past this
271 247
}
......
292 268
	git config --global color.branch auto
293 269

  
294 270
	#Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
295
<<<<<<< HEAD:util/install.sh
296
	sudo sed -i -e 's/^timeout.*$/timeout         1/' /boot/grub/menu.lst
297

  
298
    # Clean unneeded debs:
299
    rm -f ~/linux-headers-* ~/linux-image-*
300
}
301

  
302
=======
303 271
    if [ "$DIST" = "Debian" ]; then
304 272
        sudo sed -i -e 's/^timeout.*$/timeout         1/' /boot/grub/menu.lst
305 273
    fi
......
308 276
    rm -f ~/linux-headers-* ~/linux-image-*
309 277
}
310 278

  
311
>>>>>>> of1.0:util/install.sh
312 279
# Script to copy built OVS kernel module to where modprobe will
313 280
# find them automatically.  Removes the need to keep an environment variable
314 281
# for insmod usage, and works nicely with multiple kernel versions.
......
349 316
	sudo rm -rf openvswitch*.tar.gz
350 317

  
351 318
	# Remove sensistive files
352
<<<<<<< HEAD:util/install.sh
353
	history -c
354
	rm ~/.bash_history # history -c doesn't seem to work for some reason
355
=======
356 319
	history -c  # note this won't work if you have multiple bash sessions
357 320
	rm -f ~/.bash_history  # need to clear in memory and remove on disk
358
>>>>>>> of1.0:util/install.sh
359 321
	rm -f ~/.ssh/id_rsa* ~/.ssh/known_hosts
360 322
	sudo rm -f ~/.ssh/authorized_keys2
361 323

  
......
364 326
	#sudo rm -f /usr/bin/mnexec
365 327

  
366 328
	# Clear optional dev script for SSH keychain load on boot
367
<<<<<<< HEAD:util/install.sh
368
	rm ~/.bash_profile
369
=======
370 329
	rm -f ~/.bash_profile
371
>>>>>>> of1.0:util/install.sh
372 330

  
373 331
	# Clear git changes
374 332
	git config --global user.name "None"

Also available in: Unified diff