Revision 01eea350

View differences:

util/install.sh
242 242
	git config --global color.branch auto
243 243

  
244 244
	#Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
245
	sudo sed -i -e 's/^timeout.*$/timeout         1/' /boot/grub/menu.lst
245
    if [ "$DIST" = "Debian" ]; then
246
        sudo sed -i -e 's/^timeout.*$/timeout         1/' /boot/grub/menu.lst
247
    fi
246 248

  
247 249
    # Clean unneeded debs:
248 250
    rm -f ~/linux-headers-* ~/linux-image-*
......
285 287
	sudo rm -rf openvswitch*.tar.gz
286 288

  
287 289
	# Remove sensistive files
288
	history -c
289
	rm ~/.bash_history # need to clear in memory and remove on disk
290
	history -c  # note this won't work if you have multiple bash sessions
291
	rm ~/.bash_history  # need to clear in memory and remove on disk
290 292
	rm -f ~/.ssh/id_rsa* ~/.ssh/known_hosts
291 293
	sudo rm ~/.ssh/authorized_keys2
292 294

  
......
305 307
}
306 308

  
307 309
function usage {
308
    printf "Usage: %s: [-acdfhkmntvxy] args\n" $(basename $0) >&2
310
    printf 'Usage: %s [-acdfhkmntvxy]\n\n' $(basename $0) >&2
309 311
    
310
    printf "This install script attempts to install useful packages\n" >&2
311
    printf "for Mininet. It should (hopefully) work on Ubuntu 10.04 and\n" >&2
312
    printf "Debian 5.0 (Lenny). If you run into trouble, try\n" >&2
313
    printf "installing one thing at a time, and looking at the \n" >&2
314
    printf "specific installation function in this script.\n" >&2
312
    printf 'This install script attempts to install useful packages\n' >&2
313
    printf 'for Mininet. It should (hopefully) work on Ubuntu 10.04 and\n' >&2
314
    printf 'Debian 5.0 (Lenny). If you run into trouble, try\n' >&2
315
    printf 'installing one thing at a time, and looking at the \n' >&2
316
    printf 'specific installation function in this script.\n\n' >&2
315 317
        
316
    printf "\noptions:\n" >&2
317
    printf "-a: install (A)ll packages - good luck!\n" >&2
318
    printf "-c: (C)lean up after kernel install\n" >&2
319
    printf "-d: (D)elete some sensitive files from a VM image\n" >&2    
320
    printf "-f: install open(F)low\n" >&2
321
    printf "-h: print this (H)elp message\n" >&2
322
    printf "-k: install new (K)ernel\n" >&2
323
    printf "-m: install Open vSwitch kernel (M)odule\n" >&2
324
    printf "-n: install mini(N)et dependencies\nn" >&2
325
    printf "-t: install o(T)her stuff\n" >&2
326
    printf "-v: install open (V)switch\n" >&2
327
    printf "-x: install NOX(X) OpenFlow contoller\n" >&2
328
    printf "-y: install (A)ll packages\n" >&2    
318
    printf 'options:\n' >&2
319
    printf -- ' -a: (default) install (A)ll packages - good luck!\n' >&2
320
    printf -- ' -c: (C)lean up after kernel install\n' >&2
321
    printf -- ' -d: (D)elete some sensitive files from a VM image\n' >&2    
322
    printf -- ' -f: install open(F)low\n' >&2
323
    printf -- ' -h: print this (H)elp message\n' >&2
324
    printf -- ' -k: install new (K)ernel\n' >&2
325
    printf -- ' -m: install Open vSwitch kernel (M)odule\n' >&2
326
    printf -- ' -n: install mini(N)et dependencies\n' >&2
327
    printf -- ' -t: install o(T)her stuff\n' >&2
328
    printf -- ' -v: install open (V)switch\n' >&2
329
    printf -- ' -x: install NOX(X) OpenFlow contoller\n' >&2
330
    printf -- ' -y: install (A)ll packages\n' >&2    
329 331
    
330 332
    exit 2
331 333
}

Also available in: Unified diff