All pastes #175547 Raw Edit

Mine

public text v1 · immutable
·published 2006-09-18 21:55 UTC
rendered paste body
--- altboot.func.~1.13.~        2006-07-05 01:02:32.000000000 -0700
+++ altboot.func        2006-09-18 15:00:27.000000000 -0700
@@ -187,9 +187,7 @@
        do_pivot /media/image "$RL"
 }

-#$1=mountpoint of the soon-to-be rootfs, $2=Runlevel
-do_pivot(){
-
+do_kexec(){
        if test "$USE_KEXEC_ON_NEXT_BOOT" = yes
        then
                if test -e "$KEXEC_SELECTED_KERNEL.kexec.cfg"
@@ -209,7 +207,12 @@
                $KEXEC_BIN -e
                exit 0
        fi
+}
+
+#$1=mountpoint of the soon-to-be rootfs, $2=Runlevel
+do_pivot(){

+    do_kexec

        echo -n "Pivoting root..."
        if (/sbin/pivot_root "$1" "$1/media/ROM")