From 747c9ca9e30f7d798f9374923b74a84645b7d533 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 22 Apr 2010 18:12:38 +0100
Subject: [PATCH] devel/upload: add --no-debug option

When this option is used the /etc/defaults/ganeti file, which sets all
the daemons in debug mode, is not copied.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 devel/upload.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/devel/upload.in b/devel/upload.in
index f2325cd89..f690453e1 100644
--- a/devel/upload.in
+++ b/devel/upload.in
@@ -33,6 +33,7 @@ PKGLIBDIR='@PKGLIBDIR@'
 
 NO_RESTART=
 NO_CRON=
+NO_DEBUG=
 hosts=
 while [ "$#" -gt 0 ]; do
   opt="$1"
@@ -43,6 +44,9 @@ while [ "$#" -gt 0 ]; do
     --no-cron)
       NO_CRON=1
       ;;
+    --no-debug)
+      NO_DEBUG=1
+      ;;
     -h|--help)
       echo "Usage: $0 [--no-restart] hosts..."
       exit 0
@@ -78,7 +82,7 @@ make $make_args install DESTDIR="$TXD"
 install -D --mode=0755 doc/examples/ganeti.initd \
   "$TXD/$SYSCONFDIR/init.d/ganeti"
 
-[ -f doc/examples/ganeti.default-debug ] && \
+[ -f doc/examples/ganeti.default-debug -a -z "$NO_DEBUG" ] && \
 install -D --mode=0644 doc/examples/ganeti.default-debug \
   "$TXD/$SYSCONFDIR/default/ganeti"
 
-- 
GitLab