Blob Blame History Raw
diff -r d47e03cdd35f authinfo.py
--- a/authinfo.py	Mon Sep 12 21:34:15 2011 +0200
+++ b/authinfo.py	Fri Nov 04 19:08:52 2011 +0100
@@ -3171,6 +3171,7 @@
 		wrotenetgroup = False
 		wroteautomount = False
 		wrotehosts = False
+		wroteinitgroups = False
 		f = None
 		output = ""
 		all_configs[CFG_NSSWITCH].backup(self.backupDir)
@@ -3268,6 +3269,13 @@
 						output += users
 						output += "\n"
 						wrotegroup = True
+				# If it's a 'initgroups' line, insert ours instead.
+				elif matchLine(ls, "initgroups:"):
+					if not wroteinitgroups:
+						output += "initgroups: "
+						output += users
+						output += "\n"
+						wroteinitgroups = True
 				# If it's a 'netgroup' line, insert ours instead.
 				elif matchLine(ls, "netgroup:"):
 					if not wrotenetgroup:
@@ -3318,6 +3326,8 @@
 				output += "hosts:     "
 				output += hosts
 				output += "\n"
+			# For now we do not write initgroups
+			# line if not encountered
 
 			# Write it out and close it.
 			f.rewind()