[node-patches] Change in ovirt-node[master]: ovirt-functions : Modify reboot wrraper, add shutdown wrappe...
Eli Qiao
taget at linux.vnet.ibm.com
Mon Aug 27 02:59:58 UTC 2012
Eli Qiao has uploaded a new change for review.
Change subject: ovirt-functions : Modify reboot wrraper, add shutdown wrapper.
......................................................................
ovirt-functions : Modify reboot wrraper, add shutdown wrapper.
Currently, ovirt-node must reboot after doing update, this patch rewrite reboot wrapper, add a shutdown wrapper.
Change-Id: Id097e61ad14cff705e8e9e5698037a9f55003bbf
Signed-off-by: Eli Qiao <taget at linux.vnet.ibm.com>
---
M scripts/ovirt-functions
1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/83/7483/1
diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions
index 1da0fca..fc02744 100644
--- a/scripts/ovirt-functions
+++ b/scripts/ovirt-functions
@@ -901,9 +901,8 @@
/sbin/blkid -c /dev/null -l -o device -t "$@"
}
-# reboot wrapper
-# cleanup before reboot
-reboot() {
+# cleanup before reboot or shutdown
+clearup() {
cd /
rc=0
if [ "$OVIRT_ISCSI_ENABLED" != "y" ]; then
@@ -935,6 +934,17 @@
done
/sbin/reboot
}
+# reboot wrapper
+reboot() {
+ clearup
+ /sbin/reboot
+}
+
+# shutdown wrapper
+shutdown() {
+ clearup
+ /sbin/shutdown -h now
+}
# chkconfig_persist <servicename>
# since symlinks cannot be persisted, replace symlinks with hardlinks and persist
--
To view, visit http://gerrit.ovirt.org/7483
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id097e61ad14cff705e8e9e5698037a9f55003bbf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Eli Qiao <taget at linux.vnet.ibm.com>
More information about the node-patches
mailing list