ソースを参照

runqemu: Fix automated call to runqemu-ifup

When runqemu tries to call runqemu-ifup to create tap devices, it checks the
output of runqemu-ifup to get the newly created tap device.

The behavior of runqemu-ifup was recently modified along with its output, it
no longer expects the uid parameter to be passed and it prints out a warning
if it was, since this warning was now part of the output runqemu tries to parse
it and convert it to an int() which proved impossible.

Pass the correct arguments to the runqemu-ifup call and echo the warning
to stderr instead to make sure its not being parsed and used by runqemu in any
case.

(From OE-Core rev: ce3a2f4cec28290c8e530989f17243f1ada4e3bd)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Alejandro Hernandez Samaniego 1 年間 前
コミット
abeb4f1a7c
2 ファイル変更2 行追加2 行削除
  1. 1 1
      scripts/runqemu
  2. 1 1
      scripts/runqemu-ifup

+ 1 - 1
scripts/runqemu

@@ -1186,7 +1186,7 @@ to your build configuration.
             gid = os.getgid()
             gid = os.getgid()
             uid = os.getuid()
             uid = os.getuid()
             logger.info("Setting up tap interface under sudo")
             logger.info("Setting up tap interface under sudo")
-            cmd = ('sudo', self.qemuifup, str(uid), str(gid))
+            cmd = ('sudo', self.qemuifup, str(gid))
             try:
             try:
                 tap = subprocess.check_output(cmd).decode('utf-8').strip()
                 tap = subprocess.check_output(cmd).decode('utf-8').strip()
             except subprocess.CalledProcessError as e:
             except subprocess.CalledProcessError as e:

+ 1 - 1
scripts/runqemu-ifup

@@ -30,7 +30,7 @@ if [ $EUID -ne 0 ]; then
 fi
 fi
 
 
 if [ $# -eq 2 ]; then
 if [ $# -eq 2 ]; then
-	echo "Warning: uid parameter is ignored. It is no longer needed."
+	echo "Warning: uid parameter is ignored. It is no longer needed." >&2
 	GROUP="$2"
 	GROUP="$2"
 elif [ $# -eq 1 ]; then
 elif [ $# -eq 1 ]; then
 	GROUP="$1"
 	GROUP="$1"