Kleine Pimmel Scripts


#!/bin/bash
_SIZE='1' # Gigabyte
if [ -d "/srv/ramdisk/lost+found/" ]
then
    echo 'RAMdisk /srv/ramdisk already exists. Exiting.'
else
    mkdir /srv/ramdisk
    chattr +i /srv/ramdisk
    mke2fs -t ext4 -O extents -vm0 /dev/ram0 ${_SIZE}G -L 'RAMDISK'
    mount /dev/ram0 /srv/ramdisk
    chmod a+rwx /srv/ramdisk
fi