rootcopy support

pull/5/head
Tomas M 2012-10-20 22:39:31 -05:00
parent 77d0e6ea51
commit d10983c0ac
2 changed files with 15 additions and 0 deletions

View File

@ -40,6 +40,9 @@ init_union "$CHANGES" "$UNION"
# add data to union # add data to union
union_append_bundles "$DATA" "$BUNDLES" "$UNION" union_append_bundles "$DATA" "$BUNDLES" "$UNION"
debug_shell debug_shell
# rootcopy
copy_rootcopy_content "$DATA" "$UNION"
# create empty fstab # create empty fstab
fstab_create "$UNION" fstab_create "$UNION"
debug_shell debug_shell

View File

@ -367,6 +367,18 @@ persistent_changes()
fi fi
} }
# Copy content of rootcopy directory to union
# $1 = data directory
# $2 = union directory
copy_rootcopy_content()
{
if [ "$(find "$1/rootcopy/" -maxdepth 1 2>/dev/null)" != "" ]; then
echo_green_star
echo "Copying content of rootcopy directory..."
cp -a "$1/rootcopy/*" "$2"
fi
}
# Copy data to RAM if requested # Copy data to RAM if requested
# $1 = live data directory # $1 = live data directory
# $2 = changes directory # $2 = changes directory