mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 23:47:49 +00:00
util-linux-ng: rework init scripts
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
4964f40861
commit
3e2a789ca2
7
packages/sysutils/util-linux-ng/init.d/09_swapfile → packages/sysutils/util-linux-ng/init.d/32_swapfile
Executable file → Normal file
7
packages/sysutils/util-linux-ng/init.d/09_swapfile → packages/sysutils/util-linux-ng/init.d/32_swapfile
Executable file → Normal file
@ -1,5 +1,3 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (C) 2009-2010 OpenELEC.tv
|
# Copyright (C) 2009-2010 OpenELEC.tv
|
||||||
# http://www.openelec.tv
|
# http://www.openelec.tv
|
||||||
@ -25,8 +23,7 @@
|
|||||||
#
|
#
|
||||||
# runlevels: openelec, textmode
|
# runlevels: openelec, textmode
|
||||||
|
|
||||||
. /etc/profile
|
(
|
||||||
|
|
||||||
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
|
INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'`
|
||||||
SWAP=`blkid -t TYPE="swap" -o device`
|
SWAP=`blkid -t TYPE="swap" -o device`
|
||||||
SWAPFILE="$HOME/.cache/swapfile"
|
SWAPFILE="$HOME/.cache/swapfile"
|
||||||
@ -53,4 +50,4 @@ if [ "$INSTALLED_MEMORY" -le "500000" ]; then
|
|||||||
else
|
else
|
||||||
sysctl -w vm.swappiness=0 2>&1 > /dev/null
|
sysctl -w vm.swappiness=0 2>&1 > /dev/null
|
||||||
fi
|
fi
|
||||||
|
)&
|
Loading…
x
Reference in New Issue
Block a user