summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/tweaker/bin/twk_RAM.pl
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-02-17 19:39:52 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-02-17 19:39:52 (GMT)
commitaa888498fae7833aea028e9930fdfc039d59ed2b (patch)
tree162d6e8856e061e80a439861ddd1db22e970f85f /abs/core-testing/tweaker/bin/twk_RAM.pl
parente04b220f159c863cd1a80940372f524f96695d09 (diff)
parent2eaa5abe1f850dd66728fd669d74d4c978d1607c (diff)
downloadlinhes_pkgbuild-aa888498fae7833aea028e9930fdfc039d59ed2b.zip
linhes_pkgbuild-aa888498fae7833aea028e9930fdfc039d59ed2b.tar.gz
linhes_pkgbuild-aa888498fae7833aea028e9930fdfc039d59ed2b.tar.bz2
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/tweaker/bin/twk_RAM.pl')
-rwxr-xr-xabs/core-testing/tweaker/bin/twk_RAM.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/abs/core-testing/tweaker/bin/twk_RAM.pl b/abs/core-testing/tweaker/bin/twk_RAM.pl
index 79fe938..2eea598 100755
--- a/abs/core-testing/tweaker/bin/twk_RAM.pl
+++ b/abs/core-testing/tweaker/bin/twk_RAM.pl
@@ -47,7 +47,7 @@ sub implement_option {
# change any existing mplayer cache setting to one based on available RAM size
# We will arbitrarily set the cache size to 1/16 of available RAM
my $cachesize = int($RAM_size / 16);
- execute_shell_command("sed -i 's/cache.*=.*/cache=$cachesize/g' /etc/mplayer/mplayer.conf") || exit -1;
+ execute_shell_command("if [[ `grep -e cache.*=.*\$ /etc/mplayer/mplayer.conf` ]]; then sed -i 's/cache.*=.*/cache=$cachesize/g' /etc/mplayer/mplayer.conf; else echo 'cache=$cachesize' >> /etc/mplayer/mplayer.conf; fi") || exit -1;
# If there's enough RAM, make mtd run by default.
# ??? unimplemented