summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorNigel Kersten <nigelk@google.com>2009-07-20 07:59:32 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-07-21 12:19:04 +1000
commit98599c4a8d11cad4ecc11ee813a8c33a6aa9e5bb (patch)
treec2157ded0941a5dc91676a7b82181cea71426de9 /conf
parentc65974376700f54548a9412e04889ad54be84ff9 (diff)
downloadpuppet-98599c4a8d11cad4ecc11ee813a8c33a6aa9e5bb.tar.gz
puppet-98599c4a8d11cad4ecc11ee813a8c33a6aa9e5bb.tar.xz
puppet-98599c4a8d11cad4ecc11ee813a8c33a6aa9e5bb.zip
Convert to using sbindir for OS X packages, clean out previous executables in bindir
Diffstat (limited to 'conf')
-rwxr-xr-xconf/osx/createpackage.sh7
-rwxr-xr-xconf/osx/preflight8
2 files changed, 14 insertions, 1 deletions
diff --git a/conf/osx/createpackage.sh b/conf/osx/createpackage.sh
index 75b5bb012..2023839a0 100755
--- a/conf/osx/createpackage.sh
+++ b/conf/osx/createpackage.sh
@@ -23,6 +23,7 @@
INSTALLRB="install.rb"
BINDIR="/usr/bin"
+SBINDIR="/usr/sbin"
SITELIBDIR="/usr/lib/ruby/site_ruby/1.8"
PACKAGEMAKER="/Developer/usr/bin/packagemaker"
PROTO_PLIST="PackageInfo.plist"
@@ -49,7 +50,7 @@ function find_puppet_root() {
function install_puppet() {
echo "Installing Puppet to ${pkgroot}"
- "${installer}" --destdir="${pkgroot}" --bindir="${BINDIR}" --sitelibdir="${SITELIBDIR}"
+ "${installer}" --destdir="${pkgroot}" --bindir="${BINDIR}" --sbindir="${SBINDIR}" --sitelibdir="${SITELIBDIR}"
chown -R root:admin "${pkgroot}"
}
@@ -83,6 +84,10 @@ function prepare_package() {
# substitute in the sitelibdir specified above on the assumption that this
# is where any previous puppet install exists that should be cleaned out.
sed -i '' "s|{SITELIBDIR}|${SITELIBDIR}|g" "${pkgtemp}/scripts/${PREFLIGHT}"
+ # substitute in the bindir sepcified on the assumption that this is where
+ # any old executables that have moved from bindir->sbindir should be
+ # cleaned out from.
+ sed -i '' "s|{BINDIR}|${BINDIR}|g" "${pkgtemp}/scripts/${PREFLIGHT}"
chmod 0755 "${pkgtemp}/scripts/${PREFLIGHT}"
}
diff --git a/conf/osx/preflight b/conf/osx/preflight
index cde682b9c..3a6109e65 100755
--- a/conf/osx/preflight
+++ b/conf/osx/preflight
@@ -10,3 +10,11 @@
/bin/rm -Rf "${3}{SITELIBDIR}/puppet"
/bin/rm -Rf "${3}{SITELIBDIR}/puppet.rb"
+
+# In puppet 0.24.x these executables lived in bindir, but in 0.25.x they
+# have been moved to sbindir. This cleans out old ones before installing.
+/bin/rm -Rf "${3}{BINDIR}/puppetca"
+/bin/rm -Rf "${3}{BINDIR}/puppetd"
+/bin/rm -Rf "${3}{BINDIR}/puppetmasterd"
+/bin/rm -Rf "${3}{BINDIR}/puppetqd"
+/bin/rm -Rf "${3}{BINDIR}/puppetrun" \ No newline at end of file