util-linux-ng: be more silent on boot

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2010-10-25 20:50:17 +02:00
parent fc1bbd76cc
commit 9f70ffbd23

View File

@ -35,20 +35,20 @@ if [ $INSTALLED_MEMORY -le 500000 -a -f $HOME/.config/swapon ]; then
progress "creating swapfile" progress "creating swapfile"
mkdir -p $HOME/.cache mkdir -p $HOME/.cache
dd if=/dev/zero of=$HOME/.cache/swapfile bs=1024 count=524288 dd if=/dev/zero of=$HOME/.cache/swapfile bs=1024 count=524288 2>&1 > /dev/null
mkswap $HOME/.cache/swapfile mkswap $HOME/.cache/swapfile 2>&1 > /dev/null
fi fi
progress "enable swapfile" progress "enable swapfile"
swapon -p 10000 $HOME/.cache/swapfile swapon -p 10000 $HOME/.cache/swapfile
[ $INSTALLED_MEMORY -le 260000 ] \ [ $INSTALLED_MEMORY -le 260000 ] \
&& sysctl -w vm.swappiness=100 \ && sysctl -w vm.swappiness=100 2>&1 > /dev/null \
|| sysctl -w vm.swappiness=60 || sysctl -w vm.swappiness=60 2>&1 > /dev/null
else else
sysctl -w vm.swappiness=0 sysctl -w vm.swappiness=0 2>&1 > /dev/null
fi fi