Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: mod_for_test_scripts/100setupTestingInterface

Issue 2842023: Fix up the modification of the flimflam upstart script (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 echo "Configuring for backchannel network device" 7 echo "Configuring for backchannel network device"
8 8
9 testif=eth_test 9 testif=eth_test
10 10
11 # Prevent flimflam from taking control of the backchannel network device. 11 # Prevent flimflam from taking control of the backchannel network device.
12 ORIG_CONF=${ROOT_FS_DIR}/etc/init/flimflam.conf 12 ORIG_CONF=${ROOT_FS_DIR}/etc/init/flimflam.conf
13 TEMP_CONF=${ORIG_CONF}.tmp 13 TEMP_CONF=${ORIG_CONF}.tmp
14 sed "s/flimflamd -W/flimflamd -I ${testif} -W/" ${ORIG_CONF} > ${TEMP_CONF} 14 sed "s,/usr/sbin/flimflamd,/usr/sbin/flimflamd -I ${testif}," ${ORIG_CONF} > ${T EMP_CONF}
15 mv -f ${TEMP_CONF} ${ORIG_CONF} 15 mv -f ${TEMP_CONF} ${ORIG_CONF}
16 16
17 # Arrange to run dhclient on the backchannel device but without 17 # Arrange to run dhclient on the backchannel device but without
18 # installing the default route, and stashing said route away for later 18 # installing the default route, and stashing said route away for later
19 # installation as a host route. 19 # installation as a host route.
20 cat > ${ROOT_FS_DIR}/etc/udev/rules.d/50-backchannel-network.rules <<EOF 20 cat > ${ROOT_FS_DIR}/etc/udev/rules.d/50-backchannel-network.rules <<EOF
21 KERNEL=="eth*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/sbin/backchannel-setup %k" 21 KERNEL=="eth*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/sbin/backchannel-setup %k"
22 KERNEL=="${testif}", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="kill \$(cat /var /run/dhclient-%k.pid)" 22 KERNEL=="${testif}", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="kill \$(cat /var /run/dhclient-%k.pid)"
23 EOF 23 EOF
24 24
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 EXPIRE|FAIL|RELEASE|STOP) 123 EXPIRE|FAIL|RELEASE|STOP)
124 if [ -n "\$old_ip_address" ]; then 124 if [ -n "\$old_ip_address" ]; then
125 # Shut down interface, which will delete routes and clear arp cache. 125 # Shut down interface, which will delete routes and clear arp cache.
126 ifconfig \$interface inet 0 126 ifconfig \$interface inet 0
127 fi 127 fi
128 ;; 128 ;;
129 esac 129 esac
130 EOF 130 EOF
131 131
132 chmod +x ${ROOT_FS_DIR}/sbin/dhclient-backchannel-script 132 chmod +x ${ROOT_FS_DIR}/sbin/dhclient-backchannel-script
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698