Here is some blah template code example ... mount_sfs omitted for brevity ... needs to be updated for overlayfs anyhow
Code: Select all
file_missing(){
echo "$1 not found, add the appropriate mount point to MNT="
}
autoload_sfs(){
for MTPT in /mnt/*; do
[ -f "$MTPT/$1" ] && mount_sfs "$MTPT/$1" && break
done
file_missing "$1"
}
load_sfs(){
[ -f "$1" ] && mount_sfs "$1" || file_missing "$1"
}
mount_sfs(){
echo "mounting $1" #etc... and so forth
}
handle_sfs_list(){
while ([ "$1" ]) do
case "$1" in
/*)load_sfs "$1";;
*)[ "$NOSEARCH" ] || autoload_sfs "$1";;
esac
shift
done
}
SFS=a.sfs,/mnt/sda1/b.sfs,...
IFS=","
handle_sfs_list $SFS