Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 236905 | Differences between
and this patch

Collapse All | Expand All

(-)a/catalyst/base/stagebase.py (+20 lines)
Lines 195-200 class StageBase(TargetBase, ClearBase, GenBase): Link Here
195
		self.set_packages()
195
		self.set_packages()
196
		self.set_rm()
196
		self.set_rm()
197
		self.set_linuxrc()
197
		self.set_linuxrc()
198
		self.set_users()
198
		self.set_busybox_config()
199
		self.set_busybox_config()
199
		self.set_overlay()
200
		self.set_overlay()
200
		self.set_portage_overlay()
201
		self.set_portage_overlay()
Lines 614-619 class StageBase(TargetBase, ClearBase, GenBase): Link Here
614
					self.settings[self.settings["spec_prefix"] + "/linuxrc"]
615
					self.settings[self.settings["spec_prefix"] + "/linuxrc"]
615
				del self.settings[self.settings["spec_prefix"] + "/linuxrc"]
616
				del self.settings[self.settings["spec_prefix"] + "/linuxrc"]
616
617
618
	def set_users(self):
619
		users = self.settings["spec_prefix"] + "/users"
620
		if users in self.settings:
621
			if isinstance(self.settings[users], str):
622
				self.settings["users"] = self.settings[users].split()
623
			self.settings["users"] = self.settings[users]
624
			del self.settings[users]
625
		else:
626
			self.settings["users"] = []
627
617
	def set_busybox_config(self):
628
	def set_busybox_config(self):
618
		if self.settings["spec_prefix"] + "/busybox_config" in self.settings:
629
		if self.settings["spec_prefix"] + "/busybox_config" in self.settings:
619
			if isinstance(self.settings[self.settings['spec_prefix'] + '/busybox_config'], str):
630
			if isinstance(self.settings[self.settings['spec_prefix'] + '/busybox_config'], str):
Lines 955-960 class StageBase(TargetBase, ClearBase, GenBase): Link Here
955
					cmd(['rsync', '-a', x + '/', self.settings['chroot_path']],
966
					cmd(['rsync', '-a', x + '/', self.settings['chroot_path']],
956
						env=self.env)
967
						env=self.env)
957
968
969
	def users(self):
970
		for x in self.settings["users"]:
971
			log.info("Creating user: '%s'", x)
972
			cmd([
973
				"useradd", "-R", self.settings['chroot_path'],
974
				"-m", "-G", "users,wheel,audio,cdrom,usb", x
975
				],
976
				env=self.env)
977
958
	def base_dirs(self):
978
	def base_dirs(self):
959
		pass
979
		pass
960
980
(-)a/catalyst/targets/stage4.py (-3 / +3 lines)
Lines 17-23 class stage4(StageBase): Link Here
17
			"stage4/root_overlay", "stage4/fsscript",
17
			"stage4/root_overlay", "stage4/fsscript",
18
			"stage4/gk_mainargs", "splash_theme",
18
			"stage4/gk_mainargs", "splash_theme",
19
			"portage_overlay", "stage4/rcadd", "stage4/rcdel",
19
			"portage_overlay", "stage4/rcadd", "stage4/rcdel",
20
			"stage4/linuxrc", "stage4/unmerge", "stage4/rm", "stage4/empty"])
20
			"stage4/linuxrc", "stage4/unmerge", "stage4/rm", "stage4/users", "stage4/empty",
21
            ])
21
		StageBase.__init__(self,spec,addlargs)
22
		StageBase.__init__(self,spec,addlargs)
22
23
23
	def set_cleanables(self):
24
	def set_cleanables(self):
Lines 28-33 class stage4(StageBase): Link Here
28
			"config_profile_link", "setup_confdir", "portage_overlay",
29
			"config_profile_link", "setup_confdir", "portage_overlay",
29
			"bind", "chroot_setup", "setup_environment", "build_packages",
30
			"bind", "chroot_setup", "setup_environment", "build_packages",
30
			"build_kernel", "bootloader", "root_overlay", "fsscript",
31
			"build_kernel", "bootloader", "root_overlay", "fsscript",
31
			"preclean", "rcupdate", "unmerge", "unbind", "remove", "empty",
32
			"preclean", "rcupdate", "unmerge", "unbind", "remove", "users", "empty",
32
			"clean"]
33
			"clean"]
33
		self.set_completion_action_sequences()
34
		self.set_completion_action_sequences()
34
- 

Return to bug 236905