From 16a833d78288cce30060b9304c20032002adfe14 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 8 Feb 2013 10:34:45 +0100
Subject: [PATCH] Fix OCF files installation in devel/upload

LIBDIR was not defined, so the files ended up directly under /, not
good. Now they're properly installed under /usr/lib/ocf, as per
http://linux-ha.org/wiki/OCF_Resource_Agents.

Also add "set -u" to prevent future occurrences of this kind of bug.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 devel/upload | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/devel/upload b/devel/upload
index efe00217e..8e6cb675f 100755
--- a/devel/upload
+++ b/devel/upload
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012 Google Inc.
+# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2012, 2013 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
 # $prefix/lib/python2.4/site-packages/ganeti and the command line utils to
 # $prefix/sbin. It needs passwordless root login to the nodes.
 
-set -e
+set -e -u
 
 usage() {
   echo "Usage: $0 [--no-restart] [--no-cron] [--no-debug] hosts..." >&2
@@ -92,6 +92,7 @@ make $make_args install DESTDIR="$TXD"
 # fixed; we can read the prefix vars/etc.
 PREFIX="$(echo @PREFIX@ | $SED)"
 SYSCONFDIR="$(echo @SYSCONFDIR@ | $SED)"
+LIBDIR="$(echo @LIBDIR@ | $SED)"
 PKGLIBDIR="$(echo @PKGLIBDIR@ | $SED)"
 
 # copy additional needed files
-- 
GitLab