Revert "util-linux: start init scripts on RUNLEVEL=boot"

This reverts commit afb6f13517d6d532a94d51e91ca9727cc58387a5.
This commit is contained in:
Stephan Raue 2011-09-12 19:26:05 +02:00
parent 9c3dc80354
commit 3bb5a505b4

View File

@ -23,36 +23,29 @@
#
# runlevels: openelec, textmode
case $RUNLEVEL in
boot)
(
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
SWAP=`blkid -t TYPE="swap" -o device`
SWAPFILE="$HOME/.cache/swapfile"
(
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
SWAP=`blkid -t TYPE="swap" -o device`
SWAPFILE="$HOME/.cache/swapfile"
if [ "$INSTALLED_MEMORY" -le "500000" ]; then
if [ -z "$SWAP" -a ! -f "$SWAPFILE" ]; then
progress "creating swapfile"
mkdir -p $HOME/.cache
dd if=/dev/zero of=$SWAPFILE bs=1024 count=262144 2>&1 > /dev/null
mkswap $SWAPFILE 2>&1 > /dev/null
fi
if [ "$INSTALLED_MEMORY" -le "500000" ]; then
if [ -z "$SWAP" -a ! -f "$SWAPFILE" ]; then
progress "creating swapfile"
mkdir -p $HOME/.cache
dd if=/dev/zero of=$SWAPFILE bs=1024 count=262144 2>&1 > /dev/null
mkswap $SWAPFILE 2>&1 > /dev/null
fi
progress "enable swap"
[ -z "$SWAP" -a -f "$SWAPFILE" ] && SWAP=$SWAPFILE
for i in $SWAP; do
swapon -p 10000 $SWAP 2>&1 > /dev/null
done
progress "enable swap"
[ -z "$SWAP" -a -f "$SWAPFILE" ] && SWAP=$SWAPFILE
for i in $SWAP; do
swapon -p 10000 $SWAP 2>&1 > /dev/null
done
if [ "$INSTALLED_MEMORY" -le "260000" ]; then
sysctl -w vm.swappiness=100 2>&1 > /dev/null
else
sysctl -w vm.swappiness=60 2>&1 > /dev/null
fi
fi
)&
;;
poweroff|reboot)
;;
esac
if [ "$INSTALLED_MEMORY" -le "260000" ]; then
sysctl -w vm.swappiness=100 2>&1 > /dev/null
else
sysctl -w vm.swappiness=60 2>&1 > /dev/null
fi
fi
)&