try another fix for swapfile2

This commit is contained in:
carlduff 2016-03-22 11:36:23 +00:00
parent 2adec391fe
commit 9fd68c8f88

6
aif
View File

@ -1026,10 +1026,8 @@ make_swap(){
dialog --backtitle "$VERSION - $SYSTEM ($ARCHI)" --title " $_SelSwpFile " --inputbox "" 0 30 "${total_memory}M" 2>${ANSWER} || make_swap
m_or_g=$(cat ${ANSWER})
done
clear
echo -e "\nfallocate -l ${ANSWER} ${MOUNTPOINT}/swapfile\n\n"
fallocate -l ${ANSWER} ${MOUNTPOINT}/swapfile 2>/tmp/.errlog
fallocate -l ${m_or_g} ${MOUNTPOINT}/swapfile 2>/tmp/.errlog
chmod 600 ${MOUNTPOINT}/swapfile 2>>/tmp/.errlog
mkswap ${MOUNTPOINT}/swapfile 2>>/tmp/.errlog
swapon ${MOUNTPOINT}/swapfile 2>>/tmp/.errlog