OpenEneaLinux / rt-tools

Collection of Linux tools for achieving real-time performance
BSD 3-Clause "New" or "Revised" License
32 stars 17 forks source link

Failed to run partrt (local: -ri: bad variable name) #13

Open marceloamaral opened 1 year ago

marceloamaral commented 1 year ago

Hi, I am trying to use the partrt but it is failing. Please find below the steps that I used:

# sudo partrt create 0xc
WARNING: Other partitions exists that might interfere with partitions created by this tool.
         This might be because you use systemd, which also defines CPU partitions.
/usr/local/bin/partrt: 269: local: -ri: bad variable name
# partrt run -c 0x8 rt cyclictest -n -i 10000 -l 10000
/usr/local/bin/partrt: 269: local: -ri: bad variable name
uname -a
Linux node1 5.4.0-66-generic #74~18.04.2-Ubuntu SMP Fri Feb 5 11:17:31 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
zazabe commented 9 months ago

your /bin/sh is probably not the expected shell, on debian for example it's dash which doesn't have the same local.

It works if you replace the shebang of partrt by #!/bin/bash

sudo sed -i 's|#!/bin/sh -eu|#!/bin/bash -eu|' /usr/local/bin/partrt