60_pivot_usb_root 548 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. # Copyright (C) 2010 Vertical Communications
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. # Determine if we are requested to mount external root
  6. external_root_pivot() {
  7. check_skip || [ "$pi_extroot_mount_success" != "true" ] || {
  8. echo "switching to external rootfs"
  9. if [ "$ER_IS_SQUASHFS" = "true" ]; then
  10. umount /jffs
  11. fi
  12. mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true
  13. }
  14. }
  15. boot_hook_add preinit_mount_root external_root_pivot