Removing swap file on upgrade if it was made by our start script

This commit is contained in:
Igor Pecovnik 2018-09-10 20:49:21 +02:00
parent be0778b176
commit 6cac03da55
1 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,12 @@ create_board_package()
;;
esac
sysctl -p >/dev/null 2>&1
# remove swap file if it was made by our start script
if [[ \$(stat -c%s /var/swap 2> /dev/null) == 134217728 ]]; then
swapoff /var/swap
sed -i '/\/var\/swap/d' /etc/fstab
rm /var/swap
fi
# disable deprecated services
systemctl disable armhwinfo.service >/dev/null 2>&1
#