[node-patches] Change in ovirt-node[master]: init: Add more breakpoints

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu Jul 11 09:31:16 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: init: Add more breakpoints
......................................................................

init: Add more breakpoints

Change-Id: I753ed8a4bd7cf5f45b1ae79cd63bf1038009abbf
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/ovirt-init-functions.sh.in
1 file changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/21/16721/1

diff --git a/scripts/ovirt-init-functions.sh.in b/scripts/ovirt-init-functions.sh.in
index f78319f..bc5c5f9 100644
--- a/scripts/ovirt-init-functions.sh.in
+++ b/scripts/ovirt-init-functions.sh.in
@@ -57,6 +57,15 @@
     return 1
 }
 
+# Drop to a shell if the break point in question was given on the cmdline
+breakpoint() {
+    BREAKPOINT=$1
+    if hasarg "node.break=${BREAKPOINT}";
+    then
+        emergency_shell "Reached ${BREAKPOINT}"
+    fi
+}
+
 #
 # ovirt-early
 #
@@ -763,7 +772,7 @@
         done
         IFS=$oldIFS
         log "Uninstall complete, rebooting"
-        hasarg "node.break=pre-reboot" && emergency_shell "Reached pre-reboot"
+        breakpoint "pre-reboot"
         reboot
     fi
 
@@ -1063,8 +1072,10 @@
     is_auto_install
     auto_install=$?
     if [ "$auto_install" = "0" -o "$stateless" = "0" ]; then
+        breakpoint "pre-auto-install"
         /usr/libexec/ovirt-auto-install
         rc=$?
+        breakpoint "post-auto-install"
         # Handle Log file
         if [ -f $OVIRT_TMP_LOGFILE ]; then
             cat $OVIRT_TMP_LOGFILE >> $OVIRT_LOGFILE
@@ -1108,7 +1119,7 @@
         # But that doesn't matter because /var/log is already mounted, just unknown to sysd
         umount /var/log
 
-        getarg "node.break=pre-reboot" && emergency_shell "Reached pre-reboot"
+        breakpoint "pre-reboot"
         reboot
 
         if [ $? -ne 0 ]; then


-- 
To view, visit http://gerrit.ovirt.org/16721
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I753ed8a4bd7cf5f45b1ae79cd63bf1038009abbf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list