summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/bcfg2.15
-rw-r--r--src/lib/Client/Debian.py9
-rwxr-xr-xsrc/sbin/bcfg22
3 files changed, 11 insertions, 5 deletions
diff --git a/man/bcfg2.1 b/man/bcfg2.1
index 127e037a4..4af67efeb 100644
--- a/man/bcfg2.1
+++ b/man/bcfg2.1
@@ -57,6 +57,11 @@ Cause bcfg2 to remove extra configuration elements it detects. Mode is one of al
.RS
Assert a profile for the current client.
.RE
+.B "\-k"
+.RS
+Run in bulletproof mode. This currently only effect behavior in the
+debian toolset; it calls apt-get update and clean and dpkg --configure --pending.
+.RE
.SH "SEE ALSO"
.BR bcfg2-server(8),
.BR bcfg2-info(8)
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py
index 2ad28f08f..4c13443f0 100644
--- a/src/lib/Client/Debian.py
+++ b/src/lib/Client/Debian.py
@@ -23,11 +23,10 @@ class ToolsetImpl(Bcfg2.Client.Toolset.Toolset):
null = open('/dev/null', 'w+')
os.dup2(null.fileno(), sys.__stdin__.fileno())
if not self.setup['dryrun']:
- self.saferun("dpkg --force-confold --configure -a")
- if not self.setup['build']:
- self.saferun("/usr/sbin/dpkg-reconfigure -f noninteractive debconf < /dev/null")
- self.saferun("apt-get clean")
- self.saferun("apt-get -q=2 -y update")
+ if self.setup['kevlar']:
+ self.saferun("dpkg --force-confold --configure --pending")
+ self.saferun("apt-get clean")
+ self.saferun("apt-get -q=2 -y update")
self.installed = {}
self.pkgwork = {'add':[], 'update':[], 'remove':[]}
for pkg in [cpkg for cpkg in self.cfg.findall(".//Package") if not cpkg.attrib.has_key('type')]:
diff --git a/src/sbin/bcfg2 b/src/sbin/bcfg2
index 299807b18..aa8b0b8a3 100755
--- a/src/sbin/bcfg2
+++ b/src/sbin/bcfg2
@@ -59,6 +59,8 @@ class Client:
False, ('communication', 'password'), 'password', False),
'retries': (('-R', '<numretries>', 'the number of times to retry network communication'),
False, ('communication', 'retries'), '3', False),
+ 'kevlar': (('-k', False, "run in kevlar (bulletproof) mode"),
+ False, False, False, True),
}
self.setup = Bcfg2.Options.OptionParser('bcfg2', optinfo).parse()