]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
[CA-47550]: Move the echoing inside the if-statement to avoid
authorMagnus Therning <magnus.therning@citrix.com>
Thu, 28 Oct 2010 15:48:07 +0000 (16:48 +0100)
committerMagnus Therning <magnus.therning@citrix.com>
Thu, 28 Oct 2010 15:48:07 +0000 (16:48 +0100)
confusion during boot.

Signed-off-by: Magnus Therning <magnus.therning@citrix.com>
scripts/init.d-genptoken

index a60e3853b9631a774e9fc0a37349ba62c58ce4ba..3912bdf4a76fe962716d2ae4e07ae6a3715d650e 100644 (file)
@@ -8,14 +8,12 @@
 . /etc/init.d/functions
 
 start() {
-    echo -n $"Creating pool secret (this may take some time)"
-
     if [ ! -f /etc/xensource/ptoken ]; then
+        echo -n $"Creating pool secret (this may take some time)"
         /opt/xensource/libexec/genptoken -f -o /etc/xensource/ptoken
+        [ $? -eq 0 ] && success $"Done" || failure
+        echo
     fi
-
-    [ $? -eq 0 ] && success $"Done" || failure
-    echo
 }
 
 case "$1" in