|
I was playing around with FreeBSD 11 today and found that running puppet resource service failed with the error Error: Could not run: undefined method `gsub' for nil:NilClass. After doing some testing I believe it is due to Puppet not handling the results of running /etc/rc.d/bluetooth rcvar. Details and related examples below:
# note that there is not a line that says anything about enable in this service
|
➜ ~ service bluetooth rcvar
|
# bluetooth : Bluetooth setup script
|
#
|
|
➜ ~ service sshd rcvar
|
# sshd : Secure Shell Daemon
|
#
|
sshd_enable="YES"
|
# (default: "")
|
|
➜ ~ service ntpd rcvar
|
# ntpd : Network Time Protocol daemon
|
#
|
ntpd_enable="NO"
|
# (default: "")
|
|
➜ ~ puppet resource service bluetooth
|
Error: Could not run: undefined method `gsub' for nil:NilClass
|
Initially I was using the version of Puppet installed by running pkg install puppet4 which brought in Puppet 4.10.0. I uninstalled that and installed the Puppet 5.0.0 gem and got the same results.
When looking in /etc/rc.d/bluetooth I noticed that rcvar= isn't set to anything whereas /etc/rc.d/sshd is set to rcvar="sshd_enable". Attached are copies of both files.
|