From: Chris Gianelloni <wolf31o2@gentoo.org>
Date: Thu, 28 Feb 2008 17:10:37 +0000 (+0000)
Subject: Force-enable livecd/users for livecd/type gentoo-release-livecd and gentoo-gamecd.
X-Git-Tag: CATALYST_2_0_6_916~154
X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2b20e4cf8528e9e7a69c6729971e71d613c907ac;p=catalyst.git

Force-enable livecd/users for livecd/type gentoo-release-livecd and gentoo-gamecd.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1340 d1e1f19c-881f-0410-ab34-b69fee027534
---

diff --git a/ChangeLog b/ChangeLog
index a383ba15..befebd2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Id: $
 
+  28 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/support/livecdfs-update.sh:
+  Force-enable livecd/users for livecd/type gentoo-release-livecd and
+  gentoo-gamecd.
+
   28 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/support/livecdfs-update.sh:
   Remove /etc/conf.d/domainname code, since /etc/conf.d/domainname is no
diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 53df15e4..1b0e9a35 100755
--- a/targets/support/livecdfs-update.sh
+++ b/targets/support/livecdfs-update.sh
@@ -31,10 +31,25 @@ else
 	echo "127.0.0.1 livecd.gentoo livecd localhost" > /etc/hosts
 fi
 
+# Since we're an official Gentoo release, we do things the official Gentoo way.
+# As such, we override livecd/users.
+case ${clst_livecd_type} in
+	gentoo-release-livecd)
+		user_comment="Gentoo default user"
+		clst_livecd_users="gentoo"
+	;;
+	gentoo-gamecd)
+		user_comment="Gentoo GameCD default user"
+		clst_livecd_users="gamecd"
+	;;
+esac
+
 # Add any users
 if [ -n "${clst_livecd_users}" ]
 then
 	first_user=$(echo ${clst_livecd_users} | cut -d' ' -f1)
+	default_comment="Default LiveCD User"
+	[ -z "${user_comment}" ] && user_comment=${default_comment}
 
 	# Here we check to see if games exists for bug #125498
 	if [ "$(getent group games | cut -d: -f1)" != "games" ]
@@ -50,7 +65,7 @@ then
 	for x in ${clst_livecd_users}
 	do
 		useradd -G users,wheel,audio,plugdev,games,cdrom,disk,floppy,usb \
-			-c "Default LiveCD User" -m ${x}
+			-g 100 -c ${user_comment} -m ${x}
 		chown -R ${x}:users /home/${x}
 		if [ -n "${clst_livecd_xdm}" -a -n "${clst_livecd_xsession}" ]
 		then