]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
monitoring tmpfs: Mount ramdisk in initscript
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Aug 2014 14:06:54 +0000 (16:06 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 24 Aug 2014 14:06:54 +0000 (16:06 +0200)
src/initscripts/init.d/tmpfs

index 848dec6ad4ff0fc55a97b644517576ad41128af1..2ee2ffb72f783bbe223127b80a7dc548b24534ba 100644 (file)
@@ -68,6 +68,10 @@ case "$1" in
                evaluate_retval
                ;;
        restore)
+               if ! mountpoint $RRDLOG &>/dev/null; then
+                       mount -t tmpfs -o size=64M none "$RRDLOG"
+               fi
+
                if [ -e $RRDLOG.bak/cron/new.root ]; then
                        if [ -e $RRDLOG.bak/cron/root ]; then
                                rm -f $RRDLOG.bak/cron/new.root