From 0c34acfcfeaf47ecf07cb7053340956668f7b2a4 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Thu, 30 Jul 2020 16:54:44 +0200 Subject: [PATCH] fix pulseaudio re-start command line When running a kmod-load-unload test locally on a Ubuntu 20.04 machine, it couldn't re-start pulseaudio, the reason was, that the script was trying to start the command in the form ' pulseaudio -D' i.e. with several spaces in front of the executable name and that didn't work. Whereas just using the line as obtained from "ps" output works. Signed-off-by: Guennadi Liakhovetski --- case-lib/lib.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/case-lib/lib.sh b/case-lib/lib.sh index a999b799..8b6f5a0c 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -122,12 +122,10 @@ func_lib_restore_pulseaudio() fi done # start pulseaudio - local cmd="" user="" line="" + local line for line in "${PULSECMD_LST[@]}" do - user=${line%% *} - cmd=${line#* } - nohup sudo -u "$user" "$cmd" >/dev/null & + nohup sudo -u $line >/dev/null & done # now wait for the pulseaudio restore in the ps process timeout=10