Skip apt hooks outside a running system

Port 4c9b44b0 from master, adapted to the stable layout.
This commit is contained in:
Adeeb Shihadeh
2026-09-13 12:36:53 -07:00
parent 86de618833
commit cd74a06f68
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -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
+5
View File
@@ -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