From 4b743e4a6d2923794a30dcf0d73cae83f424d8ab Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 10 Jun 2025 17:27:48 -0700 Subject: [PATCH 1/2] helpers/timeout: Handle spaces in arguments Remove the intermediate "cmd" argument so that spaces in passed arguments are preserved. Signed-off-by: Elliot Berman --- helpers/timeout | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helpers/timeout b/helpers/timeout index e713cd6..1279663 100755 --- a/helpers/timeout +++ b/helpers/timeout @@ -6,11 +6,10 @@ if [ $# -lt 2 ]; then fi attempts="$1"; shift -cmd="$@" for i in `seq ${attempts}` do - $cmd && exit 0 + "$@" && exit 0 sleep 1 done From 587fec4b810bec081cd29b07d9de01a46fd6582d Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 10 Jun 2025 17:34:01 -0700 Subject: [PATCH 2/2] bootrr-generate-template: Allow spaces in device and driver names `cd ${dev}` prevents drivers (or devices) with spaces in their names from being cd'd to. Add quotes to allow spaces in the driver names. Signed-off-by: Elliot Berman --- bin/bootrr-generate-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/bootrr-generate-template b/bin/bootrr-generate-template index 42866dc..829224a 100755 --- a/bin/bootrr-generate-template +++ b/bin/bootrr-generate-template @@ -30,8 +30,8 @@ for driver_path in /sys/bus/*/drivers/* ; do # Check for each instance of the driver find "$driver_path" -type l | grep -v module$ | while read -r dev ; do - d=$(cd ${dev} ; pwd -P | sed s,.*/,,) - echo assert_device_present ${d}-probed \"${driver}\" ${d} + d="$(cd "${dev}" ; pwd -P | sed s,.*/,,)" + echo assert_device_present \"${d}-probed\" \"${driver}\" \"${d}\" done echo