restoredefaults.sh 672 B

12345678910111213141516171819202122232425
  1. #####################################################
  2. ########## Restore to defaults #############
  3. #####################################################
  4. case "$1" in
  5. restore)
  6. if [ -f /var/flasher.initcomplete ]
  7. then
  8. echo -n "Restoring to default configuration... "
  9. rm -rf /conf/*
  10. cp -Rp /etc/defconfig/* /conf
  11. if [ $? != 0 ]
  12. then
  13. echo "Failed."
  14. exit 1
  15. else
  16. echo "Done."
  17. fi
  18. fi
  19. ;;
  20. *)
  21. echo "Usage: $0 start"
  22. ;;
  23. esac