summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-23 20:42:08 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-09-23 20:42:08 +0000
commit8211df036e1d2d24e1084616fc3fc4891b06cfdd (patch)
tree597f8b999cf5210a7ceff5ef1e1977f1de08c241 /bin
parentd20ac8e0b564e5413d571f2059de559e0783b72d (diff)
Many, many changes toward a completely functional system. The only current problems with my home config are that apache's stupid init script does not do status and that packages are not working as non-root users (which makes sense).
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@703 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin')
-rwxr-xr-xbin/puppet23
-rwxr-xr-xbin/puppetd7
-rwxr-xr-xbin/puppetmasterd10
3 files changed, 35 insertions, 5 deletions
diff --git a/bin/puppet b/bin/puppet
index d3eead009..25807ee1a 100755
--- a/bin/puppet
+++ b/bin/puppet
@@ -18,6 +18,10 @@
#
# = Options
#
+# confdir::
+# The configuration root directory, where +puppetmasterd+ defaults to looking
+# for all of its configuration files. Defaults to +/etc/puppet+.
+#
# debug::
# Enable full debugging.
#
@@ -61,11 +65,13 @@ rescue LoadError
end
result = GetoptLong.new(
+ [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ],
[ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
[ "--logdest", "-l", GetoptLong::REQUIRED_ARGUMENT ],
[ "--verbose", "-v", GetoptLong::NO_ARGUMENT ],
[ "--noop", "-n", GetoptLong::NO_ARGUMENT ],
+ [ "--use-nodes", GetoptLong::NO_ARGUMENT ],
[ "--parse-only", "-p", GetoptLong::NO_ARGUMENT ],
[ "--version", "-V", GetoptLong::NO_ARGUMENT ]
)
@@ -76,9 +82,15 @@ noop = false
logfile = false
parseonly = false
+master = {
+ :Local => true
+}
+
begin
result.each { |opt,arg|
case opt
+ when "--confdir"
+ Puppet[:puppetconf] = arg
when "--version"
puts "%s" % Puppet.version
exit
@@ -90,7 +102,9 @@ begin
exit
end
when "--noop"
- noop = true
+ Puppet[:noop] = true
+ when "--use-nodes"
+ master[:UseNodes] = true
when "--verbose"
verbose = true
when "--parse-only"
@@ -121,11 +135,10 @@ elsif verbose
Puppet[:loglevel] = :info
end
+master[:File] = ARGV.shift
+
begin
- server = Puppet::Server::Master.new(
- :File => ARGV.shift,
- :Local => true
- )
+ server = Puppet::Server::Master.new(master)
rescue => detail
$stderr.puts detail
exit(1)
diff --git a/bin/puppetd b/bin/puppetd
index e66083d3c..c7ab08304 100755
--- a/bin/puppetd
+++ b/bin/puppetd
@@ -28,6 +28,10 @@
#
# = Options
#
+# confdir::
+# The configuration root directory, where +puppetmasterd+ defaults to looking
+# for all of its configuration files. Defaults to +/etc/puppet+.
+#
# debug::
# Enable full debugging.
#
@@ -91,6 +95,7 @@ rescue LoadError
end
result = GetoptLong.new(
+ [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ],
[ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
[ "--fqdn", "-f", GetoptLong::REQUIRED_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
@@ -113,6 +118,8 @@ waitforcert = false
begin
result.each { |opt,arg|
case opt
+ when "--confdir"
+ Puppet[:puppetconf] = arg
when "--help"
if $haveusage
RDoc::usage && exit
diff --git a/bin/puppetmasterd b/bin/puppetmasterd
index 055892004..33b3d1c8f 100755
--- a/bin/puppetmasterd
+++ b/bin/puppetmasterd
@@ -25,6 +25,10 @@
# refers to the autosign configuration file at /etc/puppet/autosign.conf to
# determine which hosts should have their certificates signed.
#
+# confdir::
+# The configuration root directory, where +puppetmasterd+ defaults to looking
+# for all of its configuration files. Defaults to +/etc/puppet+.
+#
# debug::
# Enable full debugging. Causes the daemon not to go into the background.
#
@@ -90,6 +94,7 @@ require 'puppet/server'
result = GetoptLong.new(
[ "--autosign", "-a", GetoptLong::NO_ARGUMENT ],
+ [ "--confdir", "-c", GetoptLong::REQUIRED_ARGUMENT ],
[ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
[ "--fsconfig", "-f", GetoptLong::REQUIRED_ARGUMENT ],
[ "--help", "-h", GetoptLong::NO_ARGUMENT ],
@@ -126,6 +131,8 @@ begin
case opt
when "--autosign"
ca[:autosign] = Puppet[:autosign]
+ when "--confdir"
+ Puppet[:puppetconf] = arg
when "--debug"
Puppet[:debug] = true
when "--fsconfig"
@@ -209,6 +216,9 @@ end
unless fs.include?(:Config)
if File.exists?(Puppet[:fileserverconfig])
fs[:Config] = Puppet[:fileserverconfig]
+ else
+ Puppet.notice "File server config %s does not exist; skipping file serving" %
+ Puppet[:fileserverconfig]
end
end