preinit 913 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. # Copyright (C) 2010 Vertical Communications
  4. [ -z "$PREINIT" ] && exec /sbin/init
  5. export PATH="%PATH%"
  6. pi_ifname=
  7. pi_ip=192.168.1.1
  8. pi_broadcast=192.168.1.255
  9. pi_netmask=255.255.255.0
  10. fs_failsafe_ifname=
  11. fs_failsafe_ip=192.168.1.1
  12. fs_failsafe_broadcast=192.168.1.255
  13. fs_failsafe_netmask=255.255.255.0
  14. fs_failsafe_wait_timeout=2
  15. pi_suppress_stderr="y"
  16. pi_init_suppress_stderr="y"
  17. pi_init_path="%PATH%"
  18. pi_init_cmd="/sbin/init"
  19. . /lib/functions.sh
  20. . /lib/functions/preinit.sh
  21. . /lib/functions/system.sh
  22. boot_hook_init preinit_essential
  23. boot_hook_init preinit_main
  24. boot_hook_init failsafe
  25. boot_hook_init initramfs
  26. boot_hook_init preinit_mount_root
  27. for pi_source_file in /lib/preinit/*; do
  28. . $pi_source_file
  29. done
  30. boot_run_hook preinit_essential
  31. pi_mount_skip_next=false
  32. pi_jffs2_mount_success=false
  33. pi_failsafe_net_message=false
  34. boot_run_hook preinit_main