#!/bin/bash
# load user data 
# by default it will load file named "xpud-data.gz", gzipped CPIO 
# load_data [<path>]

if [ -z $1 ]; then

	# load user data if exist 
	for i in `find /mnt -maxdepth 2 -name xpud-data.gz`; do 
		cd /
		cat $i | gzip -d | cpio -i
		cd -
	done

else
		if [ -e $1 ]; then
			cd /
			cat $1 | gzip -d | cpio -i
			cd -
		fi
fi
