#!/bin/sh
sudo /usr/bin/growpart /dev/sda 2
sudo /usr/sbin/pvresize -y -q /dev/sda2
sudo /usr/sbin/lvresize -y -q -r -L  6G /dev/vg_sys/lv_usr
sudo /usr/sbin/lvresize -y -q -r -L 20G /dev/vg_sys/lv_var
sudo /usr/sbin/lvresize -y -q -r -L  2G /dev/vg_sys/lv_var_log
sudo /usr/sbin/resize2fs -fF /dev/vg_sys/lv_usr
sudo /usr/sbin/resize2fs -fF /dev/vg_sys/lv_var
sudo /usr/sbin/resize2fs -fF /dev/vg_sys/lv_var_log
#export DEBIAN_FRONTEND=noninteractive
#export DEBIAN_PRIORITY=critical
#sudo -E apt-get -qy update
#sudo -E apt-get -qy -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" upgrade
#sudo -E apt-get -qy -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" dist-upgrade
#sudo -E apt-get -qy autoclean
exit 0
