#! /bin/sh
# Auto unconfiguration for fstab file

iffstab=/etc/fstab
bffstab=/etc/fstab.psplus

echo "Would you like to return to previous fstab file version? (yes/no) [no]"
answer="no"
read answer
if [ -z "$answer" ]; then
    answer="no"
    echo -n "$answer"
    echo ""
fi
case "$answer" in
    n|no|N|NO|No|non|NON|Non)
	echo ""
	echo "Previous configuration file is named as $bffstab !"
	echo "Press return to continue..."
	read
	exit 0
	;;
	
    y|yes|Y|YES|Yes|oui|OUI|Oui)
	mv "$iffstab" "$iffstab.bak"
	mv "$bffstab" "$iffstab"
	sleep 1
        mount -a
	echo "Finished!"
	exit 0
	;;
esac

echo "Finished!"

exit 0
