summaryrefslogtreecommitdiffstats
path: root/data/activate-swap
diff options
context:
space:
mode:
authorDirk2013-03-19 18:37:15 +0100
committerDirk2013-03-19 18:37:15 +0100
commit3ab7f117555d80951b026163b757c8992592f151 (patch)
tree62ae98ee17d20054246e6b07cddd883e8c4e9602 /data/activate-swap
parentShould be added to systemd ... (diff)
downloadtm-scripts-3ab7f117555d80951b026163b757c8992592f151.tar.gz
tm-scripts-3ab7f117555d80951b026163b757c8992592f151.tar.xz
tm-scripts-3ab7f117555d80951b026163b757c8992592f151.zip
Stuff to activate swap ...
Diffstat (limited to 'data/activate-swap')
-rw-r--r--data/activate-swap30
1 files changed, 0 insertions, 30 deletions
diff --git a/data/activate-swap b/data/activate-swap
deleted file mode 100644
index 10cb42e9..00000000
--- a/data/activate-swap
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2013 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found under http://openslx.org
-#
-# Initialize swap for OpenSLX linux stateless clients, both for swap on local
-# disk partitions as well as compressed ramzswap or similar
-
-#############################################################################
-
-# depends on mount-disk.sh
-# depends on availability of the appropriate kernel module/functionality
-
-# try to enable compressed RAM SWAP / ZRAM
-if modprobe ${MODPRV} ramzswap 2>/dev/null && [ -f /usr/bin/rzscontrol ] ; then
- rzscontrol /dev/ramzswap0 --init
- swapon /dev/ramzswap0 2>/dev/null
- #hdswap="# disk swap disabled because of enabled compressed ramswap"
-elif modprobe ${MODPRV} zram 2>/dev/null ; then
- # assign a quarter of total mem to zram
- echo $(( $(free -k | awk '/^Mem:/ { print $2 }') * 256 )) > /sys/block/zram0/disksize
- mkswap /dev/zram0 2>/dev/null
- swapon /dev/zram0 2>/dev/null
-fi