FactoryReset.sh 713 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. # $1 arch
  3. if [ $1 != "x86_64" ]
  4. then
  5. (\
  6. cat << EOF
  7. # Configure Loopback
  8. auto lo
  9. auto eth0
  10. auto usb0
  11. iface lo inet loopback
  12. #
  13. #iface eth0 inet dhcp
  14. iface eth0 inet static
  15. address 192.168.0.125
  16. netmask 255.255.0.0
  17. gateway 192.168.0.1
  18. post-up echo "nameserver 192.168.0.1" > /etc/resolv.conf
  19. #
  20. iface usb0 inet static
  21. address 192.168.7.2
  22. netmask 255.255.255.252
  23. #
  24. iface wlan0 inet static
  25. address 192.168.8.2
  26. broadcast 192.168.8.255
  27. netmask 255.255.255.0
  28. #
  29. EOF
  30. ) > /etc/network/interfaces
  31. ifdown eth0
  32. ifup eth0
  33. fi
  34. # --- ini default settings
  35. (\
  36. cat << EOF
  37. [CAM1SETTINGS]
  38. IpAddress=192.168.0.10
  39. EOF
  40. ) > /opt/di-soric/HMI_di-soric.ini