#!/bin/sh
##########################################################################
##                                                                      ##
## assembles the ram1 image which will be copied with dd by the linuxrc ##
## script to /dev/ram1 while booting                                    ##
##                                                                      ##
## This program is free software; you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation; either version 2 of the License, or    ##
## (at your option) any later version.                                  ##
##                                                                      ##
##########################################################################

. config_build
. "$SCRIPTS"/misc/lib/lib_fail

echo "----------------------------------"
echo "        preparing var/*          "
echo "----------------------------------"
echo 
echo


# create zeroed image file and make a filesystem
echo -n "Copying $ROOTFS/var/* to "$ROOTFS"/usr/lib/varbase/root ... "
    rm -rf $ROOTFS/usr/lib/varbase/root/*
    cp -dpR "$ROOTFS"/var/* $ROOTFS/usr/lib/varbase/root || fail
echo "Done"

echo
