From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2311D198003 for ; Sat, 9 Mar 2013 02:55:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97A83E0773; Sat, 9 Mar 2013 02:55:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 30E4DE0772 for ; Sat, 9 Mar 2013 02:55:31 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2353033E144 for ; Sat, 9 Mar 2013 02:55:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A273AE4073 for ; Sat, 9 Mar 2013 02:55:29 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1362797242.ed4d1623c3dac22ed008f518b79deecde1f33c26.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/livecdfs-update.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: ed4d1623c3dac22ed008f518b79deecde1f33c26 X-VCS-Branch: master Date: Sat, 9 Mar 2013 02:55:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c19ca3e0-83f4-4d28-82c2-c81f4bcbb147 X-Archives-Hash: 32c096edcf6f30be9d6921db5fa0fe9b commit: ed4d1623c3dac22ed008f518b79deecde1f33c26 Author: W. Trevor King tremily us> AuthorDate: Sun Mar 3 16:53:18 2013 +0000 Commit: Matt Turner gmail com> CommitDate: Sat Mar 9 02:47:22 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=ed4d1623 livecdfs-update.sh: Escape ampersands in STARTX sed expression >From sed(1): s/regexp/replacement/ Attempt to match regexp against the pattern space. If successful, replace that portion matched with replacement. The replacement may contain the special character & to refer to that portion of the pattern space which matched, and the special escapes \1 through \9 to refer to the corresponding matching sub-expressions in the regexp. This means that the old expression (with unescaped ampersands) lead to: source /etc/profile ##STARTX##STARTX su - ${first_user} -c startx when we want: source /etc/profile && su - ${first_user} -c startx with ${first_user} expanded in both cases. Reviewed-by: Matt Turner gmail.com> --- targets/support/livecdfs-update.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh index 77d694e..fda3e36 100644 --- a/targets/support/livecdfs-update.sh +++ b/targets/support/livecdfs-update.sh @@ -389,7 +389,7 @@ esac if [ -e /etc/startx ] then sed -i \ - "s:##STARTX:source /etc/profile && su - ${first_user} -c startx:" \ + "s:##STARTX:source /etc/profile \&\& su - ${first_user} -c startx:" \ /root/.bashrc fi