# ChangeLog for gentoo/src/catalyst
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.225 2005/04/20 19:48:29 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.226 2005/04/20 20:29:03 wolf31o2 Exp $
+
+ 20 Apr 2005; Chris Gianelloni <wolf31o2@gentoo.org>
+ modules/livecd_stage2_target.py, targets/support/livecdfs-update.sh:
+ Added livecd/users option to create non-root users. The first user listed
+ will also be used for auto-starting X, if X is merged onto the CD.
20 Apr 2005; Chris Gianelloni <wolf31o2@gentoo.org>
targets/livecd-stage1/livecd-stage1-controller.sh,
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.34 2005/04/14 14:59:48 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.35 2005/04/20 20:29:03 wolf31o2 Exp $
"""
Builder class for a LiveCD stage2 build.
"livecd/motd","livecd/overlay","livecd/modblacklist","livecd/splash_theme",\
"livecd/rcadd","livecd/rcdel","livecd/fsscript","livecd/xinitrc",\
"livecd/root_overlay","livecd/devmanager","livecd/splash_type",\
- "gamecd/conf","portage_overlay"])
+ "gamecd/conf","livecd/users","portage_overlay"])
generic_stage_target.__init__(self,spec,addlargs)
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.8 2005/04/20 19:48:29 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.9 2005/04/20 20:29:03 wolf31o2 Exp $
/usr/sbin/env-update
source /etc/profile
;;
esac
+# Add any users
+if [ -n "${clst_livecd_users}" ]
+then
+ for x in ${clst_livecd_users}
+ do
+ useradd -G users,wheel,audio,games,cdrom,usb -c "Default LiveCD User" -m $x
+ done
+fi
+
# setup sudoers
sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
+# we want the first user to be used when auto-starting X
+if [ -n "${clst_livecd_users}" -a -e /etc/startx ]
+then
+ first_user=$(echo ${clst_livecd_users} | cut -d' ' -f1)
+ sed -i "s/startx/su - $first_user -c startx/" /root/.bashrc
+fi
+
# setup dhcp on all detected ethernet devices
echo "iface_eth0=\"dhcp\""> /etc/conf.d/net
echo "iface_eth1=\"dhcp\"" >> /etc/conf.d/net