* [PATCH 0/1] Update runqemu-gen-tapdevs to take UID
@ 2012-07-31 17:59 Elizabeth Flanagan
2012-07-31 18:00 ` [PATCH 1/1] runqemu-gen-tapdevs: add UID to CL options Elizabeth Flanagan
0 siblings, 1 reply; 2+ messages in thread
From: Elizabeth Flanagan @ 2012-07-31 17:59 UTC (permalink / raw)
To: openembedded-core
runqemu-if* now requires UID as a command line option which means
runqemu-gen-tapdevs needs to take it as an option.
The following changes since commit 3309cf42d314f0a26079a11836c6b9b9bb5f253e:
package_rpm.bbclass: Accomodate dash when using arrays (2012-07-31 12:22:10 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib eflanagan/tapdevs
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=eflanagan/tapdevs
Elizabeth Flanagan (1):
runqemu-gen-tapdevs: add UID to CL options
scripts/runqemu-gen-tapdevs | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] runqemu-gen-tapdevs: add UID to CL options
2012-07-31 17:59 [PATCH 0/1] Update runqemu-gen-tapdevs to take UID Elizabeth Flanagan
@ 2012-07-31 18:00 ` Elizabeth Flanagan
0 siblings, 0 replies; 2+ messages in thread
From: Elizabeth Flanagan @ 2012-07-31 18:00 UTC (permalink / raw)
To: openembedded-core
runqemu-if* now requires UID as a command line option which means
runqemu-gen-tapdevs needs to take it as an option.
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
---
scripts/runqemu-gen-tapdevs | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index 15bccd4..2c1ff0e 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -23,7 +23,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
usage() {
- echo "Usage: sudo $0 <gid> <num> <native-sysroot-basedir>"
+ echo "Usage: sudo $0 <uid> <gid> <num> <native-sysroot-basedir>"
+ echo "Where <uid> is the numeric user id the tap devices will be owned by"
echo "Where <gid> is the numeric group id the tap devices will be owned by"
echo "<num> is the number of tap devices to create (0 to remove all)"
echo "<native-sysroot-basedir> is the path to the build system's native sysroot"
@@ -35,14 +36,15 @@ if [ $EUID -ne 0 ]; then
exit
fi
-if [ $# -ne 3 ]; then
+if [ $# -ne 4 ]; then
echo "Error: Incorrect number of arguments"
usage
fi
-GID=$1
-COUNT=$2
-SYSROOT=$3
+TUID=$1
+GID=$2
+COUNT=$3
+SYSROOT=$4
TUNCTL=$SYSROOT/usr/bin/tunctl
if [[ ! -x "$TUNCTL" || -d "$TUNCTL" ]]; then
@@ -73,10 +75,10 @@ for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }'`; do
$TUNCTL -d $tap
done
-echo "Creating $COUNT tap devices for GID $GID..."
+echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
for ((index=0; index < $COUNT; index++)); do
echo "Creating tap$index"
- ifup=`$RUNQEMU_IFUP $GID $SYSROOT 2>&1`
+ ifup=`$RUNQEMU_IFUP $TUID $GID $SYSROOT 2>&1`
if [ $? -ne 0 ]; then
echo "Error running tunctl: $ifup"
exit 1
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-31 18:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 17:59 [PATCH 0/1] Update runqemu-gen-tapdevs to take UID Elizabeth Flanagan
2012-07-31 18:00 ` [PATCH 1/1] runqemu-gen-tapdevs: add UID to CL options Elizabeth Flanagan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.