aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2013-03-03 11:53:18 -0500
committerMatt Turner <mattst88@gmail.com>2013-03-08 18:47:22 -0800
commited4d1623c3dac22ed008f518b79deecde1f33c26 (patch)
treee0e38c0718d2ea0a447e797ea008e02170524808 /targets
parentdoc/HOWTO.txt: Explain how to run catalyst without installing (diff)
downloadcatalyst-ed4d1623c3dac22ed008f518b79deecde1f33c26.tar.gz
catalyst-ed4d1623c3dac22ed008f518b79deecde1f33c26.tar.bz2
catalyst-ed4d1623c3dac22ed008f518b79deecde1f33c26.zip
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 <mattst88@gmail.com>
Diffstat (limited to 'targets')
-rw-r--r--targets/support/livecdfs-update.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/targets/support/livecdfs-update.sh b/targets/support/livecdfs-update.sh
index 77d694ef..fda3e362 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