[Ovirt-devel] Bugs with ovirt-awake
Arthur CLEMENT
aclement at linagora.com
Tue Mar 9 15:25:31 UTC 2010
The ovirt-awake script is no more in the path, only in /etc/init.d/ so the
ovirt script return a command not found.
I did little dirty fix in /etc/init.d/ovirt :
diff --git a/scripts/ovirt b/scripts/ovirt
index 160c3d3..d9e50a2 100755
--- a/scripts/ovirt
+++ b/scripts/ovirt
@@ -41,7 +41,7 @@ ovirt_start() {
if [ -s $krb5_tab ]; then
krb5_tab=
fi
- ovirt-awake start $SRV_HOST $SRV_PORT $krb5_tab
+ /etc/init.d/ovirt-awake start $SRV_HOST $SRV_PORT $krb5_tab
if [ $? -ne 0 ]; then
log "ovirt-awake failed"; return 1
fi
It raises an other problem :
[...]
Mar 08 17:07:52 Starting ovirt
Starting ovirt-awake: /etc/init.d/ovirt-awake: line 71:
/dev/tcp/"host_addr":12120: No such file or directory
/etc/init.d/ovirt-awake: line 73: connect-to-server: command not found
/etc/init.d/ovirt-awake: line 49: 3: Bad file descriptor
/etc/init.d/ovirt-awake: line 75: [: ==: unary operator expected
/etc/init.d/ovirt-awake: line 45: 3: Bad file descriptor
/etc/init.d/ovirt-awake: line 97: 3: Bad file descriptor
Mar 08 17:07:53 Completed ovirt-awake: RETVAL=0
^[[60G[^[[0;31mFAILED^[[0;39m]^MMar 08 17:07:53 ovirt-awake failed
[...]
l 71 : it's a problem with the net redirection in bash
my little fix :
diff --git a/scripts/ovirt-awake b/scripts/ovirt-awake
index c6a6902..8983ef1 100755
--- a/scripts/ovirt-awake
+++ b/scripts/ovirt-awake
@@ -68,7 +68,7 @@ ovirt_startup () {
if [[ -n "${mgmthost}" ]] && [[ -n "${mgmtport}" ]]; then
# log "Notifying oVirt management server: ${mgmthost}:${mgmtport}"
- exec 3<> /dev/tcp/$mgmthost:$mgmtport
+ exec 3<>/dev/tcp/$mgmthost/$mgmtport
connect-to-server
receive_text
if [ $REPLY == "HELLO?" ]; then
- logo "Starting wakeup conversation."
+ log "Starting wakeup conversation."
send_text "HELLO!"
receive_text
I still have this error :
Starting ovirt-awake: /etc/init.d/ovirt-awake: line 73: connect-to-server:
command not found
The function has been removed by D Pierce :
http://www.mail-archive.com/ovirt-devel@redhat.com/msg00445.html
--
Arthur CLEMENT
Linagora Paris
More information about the ovirt-devel
mailing list