#!/bin/sh # Copyright (C) 2006 OpenWrt.org #pivot function blatantly stolen from the firstboot stuff in the WRT54 arch files pivot() { # mount -o move /proc $1/proc && \ pivot_root $1 $1$2 && { mount -o move $2/dev /dev mount -o move $2/tmp /tmp mount -o move $2/sys /sys return 0 } } #just a little bit of time for the usb to settle down and get plugged in #technically it probably should be done in hotplug, but, we need to handle #the case of no key at all, and fall thru to ramdisk when it's selected sleep 5 if [[ "$NOPIVOT" = "1" ]]; then echo starting from a ramdisk else mount /dev/discs/disc0/disc /mnt mkdir -p /mnt/old pivot /mnt /old fi