From 2b78d2efa1880a891e3589efb333414740ca3c84 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Mon, 17 Apr 2006 19:01:02 +0000 Subject: [PATCH] Moved sed line for ##STARTX to end of file, since we aren't touching /etc/startx until the end. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1110 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- targets/support/livecdfs-update.sh | 17 +++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6727dde7..03f62767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.595 2006/04/17 18:57:35 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.596 2006/04/17 19:01:02 wolf31o2 Exp $ + + 17 Apr 2006; Chris Gianelloni + targets/support/livecdfs-update.sh: + Moved sed line for ##STARTX to end of file, since we aren't touching + /etc/startx until the end. 17 Apr 2006; Chris Gianelloni targets/support/livecdfs-update.sh: diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh index 681b7381..271da123 100755 --- a/targets/support/livecdfs-update.sh +++ b/targets/support/livecdfs-update.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2005 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.43 2006/04/17 18:57:35 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.44 2006/04/17 19:01:02 wolf31o2 Exp $ . /tmp/chroot-functions.sh @@ -61,13 +61,6 @@ then sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers fi -# 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 @@ -373,6 +366,14 @@ case ${clst_livecd_type} in ;; esac +# 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/source /etc/profile && su - $first_user -c startx/" \ + /root/.bashrc +fi + if [-e /lib/rcscripts/addons/udev-start.sh ] then sed -i "s:\t\[\[ -x /sbin/evms_activate:\t\[\[ -x \${CDBOOT} \]\] \&\& \[\[ -x /sbin/evms_activate:" /lib/rcscripts/addons/udev-start.sh -- 2.26.2