Signed-off-by: Nigel Kersten <[email protected]>
---
conf/osx/createpackage.sh | 7 ++++++-
conf/osx/preflight | 8 ++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/conf/osx/createpackage.sh b/conf/osx/createpackage.sh
index 75b5bb0..2023839 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 cde682b..3a6109e 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
--
1.6.3.3
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---