Automatically resize the root filesystem if needed

This commit is contained in:
David Carley
2021-03-07 21:21:35 -08:00
parent 1f8a743f65
commit 55c0ec844e
6 changed files with 123 additions and 1 deletions

View File

@@ -93,7 +93,9 @@ if [ $? -ne 0 ]; then
REBOOT=true
fi
# Install xinitrc
# Install .Xresources & .xinitrc
cp scripts/Xresources ~pi/.Xresources
chown pi:pi ~pi/.Xresources
cp scripts/xinitrc ~pi/.xinitrc
chmod +x ~pi/.xinitrc
chown pi:pi ~pi/.xinitrc
@@ -133,6 +135,13 @@ if $UPDATE_PY; then
chmod 777 $HTTP_DIR
fi
# Expand the file system if necessary
chmod +x ./scripts/resize_root_fs.sh
./scripts/resize_root_fs.sh
if [ $? -eq 0 ]; then
REBOOT=true
fi
sync
if $REBOOT; then