diff --git a/userspace/root/usr/comma/comma.sh b/userspace/root/usr/comma/comma.sh index 56bafd8..b83efb0 100755 --- a/userspace/root/usr/comma/comma.sh +++ b/userspace/root/usr/comma/comma.sh @@ -17,13 +17,13 @@ echo 1689600 | sudo tee /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq echo "waiting for magic" for i in {1..200}; do - if systemctl is-active --quiet magic && [ -S /tmp/drmfd.sock ]; then + if [ -S /tmp/drmfd.sock ]; then break fi sleep 0.1 done -if systemctl is-active --quiet magic && [ -S /tmp/drmfd.sock ]; then +if [ -S /tmp/drmfd.sock ]; then echo "magic ready after ${SECONDS}s" else echo "timed out waiting for magic, ${SECONDS}s" diff --git a/userspace/root/usr/comma/shims/systemctl b/userspace/root/usr/comma/shims/systemctl deleted file mode 100755 index 5dc0e36..0000000 --- a/userspace/root/usr/comma/shims/systemctl +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -if [ "$1" = "is-active" ] && [ "$2" = "--quiet" ] && [ "$3" = "magic" ]; then - if pgrep -u comma -f "/usr/comma/magic.py" >/dev/null 2>&1 && [ -S /tmp/drmfd.sock ]; then - exit 0 - fi - exit 3 -fi - -if [ "$1" = "daemon-reload" ]; then - exit 0 -fi - -exec /usr/bin/systemctl "$@"