Newer
Older
#!/bin/bash
# swapfile.conf
#
# swapfile anlegen als Unterstützung für zram
swapfile=/swapfile
mbcount=512
if [ ! -w $swapfile ]; then
dd if=/dev/zero of=$swapfile bs=1M count=$mbcount
fi
if ! fuser -u -v $swapfile ; then
chmod -v 0600 $swapfile
mkswap $swapfile
swapon -v $swapfile
fi