diff --git a/userspace/root/usr/comma/apt_setup.sh b/userspace/root/usr/comma/apt_setup.sh index 5af3ca3..21bacde 100755 --- a/userspace/root/usr/comma/apt_setup.sh +++ b/userspace/root/usr/comma/apt_setup.sh @@ -1,7 +1,7 @@ #!/bin/bash -e -# Skip while Docker is assembling the image. -if [ -f /.dockerenv ]; then +# Skip unless this is a booted systemd system. +if [ ! -d /run/systemd/system ]; then exit 0 fi diff --git a/userspace/root/usr/comma/apt_teardown.sh b/userspace/root/usr/comma/apt_teardown.sh index 6b2c30e..57f3128 100755 --- a/userspace/root/usr/comma/apt_teardown.sh +++ b/userspace/root/usr/comma/apt_teardown.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Skip while Docker is assembling the image. -if [ -f /.dockerenv ]; then +# Skip unless this is a booted systemd system. +if [ ! -d /run/systemd/system ]; then exit 0 fi