Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169363 - catalyst-2.0.3_pre2 removes # from beginning of all lines in rc.conf
Summary: catalyst-2.0.3_pre2 removes # from beginning of all lines in rc.conf
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2007-03-04 20:54 UTC by Andrew Gaffney (RETIRED)
Modified: 2007-03-20 17:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to fix the problem (catalyst.patch,677 bytes, patch)
2007-03-04 20:54 UTC, Andrew Gaffney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Gaffney (RETIRED) gentoo-dev 2007-03-04 20:54:16 UTC
The sed statement that sets DISPLAYMANAGER in rc.conf in targets/support/livecdfs-update.sh is a bit off:

sed -i \
  -e "s:DISPLAYMANAGER=\"xdm\":DISPLAYMANAGER=\"${clst_livecd_xdm}\":" \
  -e ":^DISPLAYMANAGER: s:^#::" \
  /etc/rc.conf

The first regex in the 2nd part of the command is ignored since it's not wrapped in / /. This causes sed to remove # from the beginning of all lines in rc.conf.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2007-03-04 20:54:35 UTC
Created attachment 112115 [details, diff]
patch to fix the problem
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2007-03-04 20:56:47 UTC
The patch merges the two parts into a single regex that takes care of an existing DISPLAYMANAGER line with or without a beginning #. It also handles the case of the default possibly changing from "xdm" in the future. I made the same modification to the sed statement for /etc/conf.d/xdm.
Comment 3 Andrew Gaffney (RETIRED) gentoo-dev 2007-03-04 21:09:47 UTC
I just re-ran livecd-stage2 with my patch, and it appears that both rc.conf and conf.d/xdm were modified properly. Also, it appears that the current sed statement doesn't work with / /, either. Perhaps it's the space between the 2 parts of the second statement. Whatever... :P
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2007-03-06 17:41:17 UTC
Fixed in SVN/2.0.3_pre3
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2007-03-20 17:17:24 UTC
This is fixed in 2.0.3 which should be hitting the tree shortly.