diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2017-04-12 23:40:59 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-13 10:54:10 +0100 |
commit | 4393cc550b4b3feaa42b988b819c13518c836f09 (patch) | |
tree | c3c09ab9f0dd20c5ae17550b3e67cd76f42e9fb5 /scripts/runqemu | |
parent | 4d3bececf617dca82b5043781d63229427c734db (diff) | |
download | poky-4393cc550b4b3feaa42b988b819c13518c836f09.tar.gz |
runqemu: use bindir_native property to run ifup/down scripts
Used self.bindir_native to point out to the native sysroot
when running runqemu-ifup and runqemu-ifdown scripts.
[YOCTO #11266]
[YOCTO #11193]
(From OE-Core rev: cc5513bf7a6114e14bb307acb88a44e9cf0aed8a)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 6cdedd8d7e..3744c67409 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -920,7 +920,7 @@ class BaseConfig(object): | |||
920 | gid = os.getgid() | 920 | gid = os.getgid() |
921 | uid = os.getuid() | 921 | uid = os.getuid() |
922 | logger.info("Setting up tap interface under sudo") | 922 | logger.info("Setting up tap interface under sudo") |
923 | cmd = 'sudo %s %s %s %s' % (self.qemuifup, uid, gid, self.get('STAGING_DIR_NATIVE')) | 923 | cmd = 'sudo %s %s %s %s' % (self.qemuifup, uid, gid, self.bindir_native) |
924 | tap = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8').rstrip('\n') | 924 | tap = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8').rstrip('\n') |
925 | lockfile = os.path.join(lockdir, tap) | 925 | lockfile = os.path.join(lockdir, tap) |
926 | self.lock = lockfile + '.lock' | 926 | self.lock = lockfile + '.lock' |
@@ -1140,7 +1140,7 @@ class BaseConfig(object): | |||
1140 | 1140 | ||
1141 | def cleanup(self): | 1141 | def cleanup(self): |
1142 | if self.cleantap: | 1142 | if self.cleantap: |
1143 | cmd = 'sudo %s %s %s' % (self.qemuifdown, self.tap, self.get('STAGING_DIR_NATIVE')) | 1143 | cmd = 'sudo %s %s %s' % (self.qemuifdown, self.tap, self.bindir_native) |
1144 | logger.info('Running %s' % cmd) | 1144 | logger.info('Running %s' % cmd) |
1145 | subprocess.call(cmd, shell=True) | 1145 | subprocess.call(cmd, shell=True) |
1146 | if self.lock_descriptor: | 1146 | if self.lock_descriptor: |