Skip to content

Instantly share code, notes, and snippets.

@jonyesno
Created November 29, 2014 07:40
Show Gist options
  • Save jonyesno/f3dfbe560ef27990140b to your computer and use it in GitHub Desktop.
Save jonyesno/f3dfbe560ef27990140b to your computer and use it in GitHub Desktop.
FreeBSD puppetmaster rc.d fix
--- /home/lemon/tmp/puppetmaster 2014-11-29 07:33:00.105610545 +0000
+++ /usr/local/etc/rc.d/puppetmaster 2014-11-29 07:33:44.000000000 +0000
@@ -28,13 +28,13 @@
unset puppetmaster_flags
pidfile="${puppetmaster_rundir}/master.pid"
-puppet_manifestdir="$($command config print manifestdir)"
+puppet_manifest="$($command config print manifest)"
start_precmd="puppetmaster_checkconfig"
restart_precmd="puppetmaster_checkconfig"
puppetmaster_checkconfig() {
echo -n "Performing sanity check of ${name} configuration: "
- if ! ${command} parser validate "${puppet_manifestdir}/site.pp"
+ if ! ${command} parser validate "${puppet_manifest}"
then
echo "FAILED"
return 1
@jonyesno
Copy link
Author

Patch to cope with site.pp living somewhere not in /usr/local/etc/puppet/manifests (eg: a SCM checkout)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment