mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-07-24 00:02:04 +08:00
no fake systemctl
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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 "$@"
|
||||
Reference in New Issue
Block a user