mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-10-28 00:53:48 +08:00
Skip apt hooks outside a running system
Port 4c9b44b0 from master, adapted to the stable layout.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user