summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-26 04:44:25 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-26 04:44:25 +0000
commit0ae5e3392597452acf6a2e9f0d4ac976b8ec9846 (patch)
treee2307bce0ffacb9bf8ed54b0ebe84632b51fd9b8 /bin
parent0d3db7984fd40769cbb29cde76e081cb06204710 (diff)
Adding logging methods to all Puppet::Element instances, and converting all instance log statements to use those methods. Additionally modified logging to take advantage of this by including the path of the logging object in the output. Logs will still need some cleanup to avoid duplicate information.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@731 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'bin')
-rwxr-xr-xbin/puppet8
-rwxr-xr-xbin/puppetd8
-rwxr-xr-xbin/puppetmasterd8
3 files changed, 24 insertions, 0 deletions
diff --git a/bin/puppet b/bin/puppet
index 25807ee1a..84c910e97 100755
--- a/bin/puppet
+++ b/bin/puppet
@@ -9,6 +9,7 @@
#
# puppet [-h|--help] [-V|--version] [-d|--debug] [-v|--verbose]
# [-l|--logfile <file>] [-p|--parse-only] <file>
+# [-c|--confdir <configuration directory>] [--vardir <var directory>]
#
# = Description
#
@@ -35,6 +36,10 @@
# parse-only::
# Just verify syntax, do not apply anything.
#
+# vardir::
+# The variable-size directory, used for storing state. Defaults to
+# /var/puppet.
+#
# verbose::
# Print extra information.
#
@@ -73,6 +78,7 @@ result = GetoptLong.new(
[ "--noop", "-n", GetoptLong::NO_ARGUMENT ],
[ "--use-nodes", GetoptLong::NO_ARGUMENT ],
[ "--parse-only", "-p", GetoptLong::NO_ARGUMENT ],
+ [ "--vardir", GetoptLong::REQUIRED_ARGUMENT ],
[ "--version", "-V", GetoptLong::NO_ARGUMENT ]
)
@@ -119,6 +125,8 @@ begin
else
$stderr.puts "Invalid log destination %s" % arg
end
+ when "--vardir"
+ Puppet[:puppetvar] = arg
end
}
rescue GetoptLong::InvalidOption => detail
diff --git a/bin/puppetd b/bin/puppetd
index 2d11f4d7e..68cfad09d 100755
--- a/bin/puppetd
+++ b/bin/puppetd
@@ -12,6 +12,7 @@
# [--ssldir <cert directory>] [-l|--logdest <syslog|<file>|console>]
# [--fqdn <host name>] [-p|--port <port>] [-s|--server <server>]
# [-w|--waitforcert <seconds>] [-c|--confdir <configuration directory>]
+# [--vardir <var directory>]
#
# = Description
#
@@ -58,6 +59,10 @@
# ssldir::
# Where to store and find certificates. Defaults to /etc/puppet/ssl.
#
+# vardir::
+# The variable-size directory, used for storing state. Defaults to
+# /var/puppet.
+#
# verbose::
# Turn on verbose reporting.
#
@@ -106,6 +111,7 @@ result = GetoptLong.new(
[ "--ssldir", GetoptLong::REQUIRED_ARGUMENT ],
[ "--verbose", "-v", GetoptLong::NO_ARGUMENT ],
[ "--version", "-V", GetoptLong::NO_ARGUMENT ],
+ [ "--vardir", GetoptLong::REQUIRED_ARGUMENT ],
[ "--waitforcert", "-w", GetoptLong::REQUIRED_ARGUMENT ]
)
@@ -152,6 +158,8 @@ begin
else
$stderr.puts "Invalid log destination %s" % arg
end
+ when "--vardir"
+ Puppet[:puppetvar] = arg
when "--waitforcert"
waitforcert = arg
end
diff --git a/bin/puppetmasterd b/bin/puppetmasterd
index cd1800927..a72f2327d 100755
--- a/bin/puppetmasterd
+++ b/bin/puppetmasterd
@@ -11,6 +11,7 @@
# [-l|--logdest <syslog|console|<file>>] [--httplog <file>]
# [-m|--manifest <site manifest>] [--noca] [-p|--port <port>]
# [--parseonly] [-s|--ssldir <cert directory>]
+# [-c|--confdir <configuration directory>] [--vardir <var dir>]
#
# = Description
#
@@ -69,6 +70,10 @@
# ssldir::
# The directory in which to store certificates. Defaults to /etc/puppet/ssl.
#
+# vardir::
+# The variable-size directory, used for storing state. Defaults to
+# /var/puppet.
+#
# verbose::
# Enable verbosity. Causes the daemon not to go into the background.
#
@@ -106,6 +111,7 @@ result = GetoptLong.new(
[ "--parseonly", GetoptLong::NO_ARGUMENT ],
[ "--port", "-p", GetoptLong::REQUIRED_ARGUMENT ],
[ "--ssldir", "-s", GetoptLong::REQUIRED_ARGUMENT ],
+ [ "--vardir", GetoptLong::REQUIRED_ARGUMENT ],
[ "--verbose", "-v", GetoptLong::NO_ARGUMENT ],
[ "--version", "-V", GetoptLong::NO_ARGUMENT ]
)
@@ -171,6 +177,8 @@ begin
else
$stderr.puts "Invalid log destination %s" % arg
end
+ when "--vardir"
+ Puppet[:puppetvar] = arg
when "--version"
puts "%s" % Puppet.version
exit