diff --git a/userspace/usr/comma/apt_setup.sh b/userspace/usr/comma/apt_setup.sh index 75e3b60..21bacde 100755 --- a/userspace/usr/comma/apt_setup.sh +++ b/userspace/usr/comma/apt_setup.sh @@ -1,5 +1,10 @@ #!/bin/bash -e +# Skip unless this is a booted systemd system. +if [ ! -d /run/systemd/system ]; then + exit 0 +fi + sudo mount -o rw,remount / sudo resize2fs $(findmnt -n -o SOURCE /) &>/dev/null || sudo resize2fs $(findmnt -n -o SOURCE /) sudo mount -o remount,size=1500M /var diff --git a/userspace/usr/comma/apt_teardown.sh b/userspace/usr/comma/apt_teardown.sh index 76cf4fe..57f3128 100755 --- a/userspace/usr/comma/apt_teardown.sh +++ b/userspace/usr/comma/apt_teardown.sh @@ -1,3 +1,8 @@ #!/bin/bash +# Skip unless this is a booted systemd system. +if [ ! -d /run/systemd/system ]; then + exit 0 +fi + sudo mount -o ro,remount / || true