11_migrate-sysctl 450 B

12345678910111213141516
  1. #!/bin/sh
  2. if [ ! -f "/rom/etc/sysctl.conf" ] || cmp -s "/rom/etc/sysctl.conf" "/etc/sysctl.conf"; then
  3. exit 0
  4. fi
  5. fingerprint="$(md5sum /etc/sysctl.conf)"
  6. fingerprint="${fingerprint%% *}"
  7. if [ "$fingerprint" = "1b05ebb41f72cb84e5510573cd4aca26" ] || \
  8. [ "$fingerprint" = "62deb895be1a7f496040187b7c930e4e" ]; then
  9. logger -t migrate-sysctl "Updating sysctl.conf to use current defaults"
  10. cp "/rom/etc/sysctl.conf" "/etc/sysctl.conf"
  11. fi
  12. exit 0