Make shill and flimflam Ignore pseudomodem0p on test builds

Make shill and flimflam ignore pseudomodem0p on test builds so that
the network devices called pseudomodem0p can be used to test the
cellular classes of shill on virtual machines.

BUG=none
TEST=run network_3GModemControl on a vm
Change-Id: I61cc89d114dcb82bb01b864b68f220fbaf21509d
Reviewed-on: https://gerrit.chromium.org/gerrit/23059
Commit-Ready: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
This commit is contained in:
Jason Glasgow 2012-05-17 17:19:29 -04:00 committed by Gerrit
parent c321a9a026
commit e4c4c35d12

View File

@ -7,12 +7,13 @@
echo "Configuring for backchannel network device"
testif=eth_test
modemif=pseudomodem0p
# Prevent flimflam from taking control of the backchannel network device.
ORIG_CONF=${ROOT_FS_DIR}/etc/init/flimflam.conf
TEMP_CONF=${ORIG_CONF}.tmp
sed -e "s,flimflamd,flimflamd -I ${testif}," \
-e "s,SHILL_TEST_ARGS=\"\",SHILL_TEST_ARGS=\"--device-black-list=${testif}\"," \
sed -e "s,flimflamd,flimflamd -I ${testif} -I ${modemif}," \
-e "s@SHILL_TEST_ARGS=\"\"@SHILL_TEST_ARGS=\"--device-black-list=${testif},${modemif}\"@" \
${ORIG_CONF} > ${TEMP_CONF}
mv -f ${TEMP_CONF} ${ORIG_CONF}