FS#13101 - simple fix to setup script writing timezone to rc.conf

Attached to Project: Release Engineering
Opened by Gerardo Exequiel Pozzi (djgera) - Monday, 02 February 2009, 21:39 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Saturday, 14 February 2009, 13:05 GMT
Task Type Bug Report
Category archlinux-installer (deprecate
Status Closed
Assigned To Aaron Griffin (phrakture)
Gerhard Brauer (GerBra)
Dieter Plaetinck (Dieter_be)
Architecture All
Severity Low
Priority Normal
Reported Version 2009.01-beta
Due in Version 2009.02
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,

Timezone settings isn't writen to $DESTDIR/etc/rc.conf because sed fails.

For example, when $TIMEZONE="America/Buenos_Aires"

sed: -e expression #1, char 34: unknown option to `s'

a simple fix is attached, this escapes all slashes.
This task depends upon

Closed by  Dieter Plaetinck (Dieter_be)
Saturday, 14 February 2009, 13:05 GMT
Reason for closing:  Fixed
Additional comments about closing:  confirmed by myself and http://www.archlinux.org/pipermail/arch- releng/2009-February/000327.html
Comment by Aaron Griffin (phrakture) - Friday, 06 February 2009, 17:33 GMT
Should we throw this in an RC2?
Comment by Aaron Griffin (phrakture) - Friday, 06 February 2009, 19:19 GMT
Pushed to git
Comment by Dieter Plaetinck (Dieter_be) - Friday, 06 February 2009, 19:54 GMT
Note that instead of:
sed -i -e "s/^TIMEZONE=.*/TIMEZONE=\"$(echo $TIMEZONE | sed "s/\//\\\\\//g")\"/g" \
You can do:
sed -i -e "s/^TIMEZONE=.*/TIMEZONE=\"${TIMEZONE//\//\\/}\"/g" \
If a timezone string never contains more then 1 slash, you can even make it:
sed -i -e "s/^TIMEZONE=.*/TIMEZONE=\"${TIMEZONE/\//\\/}\"/g" \
Comment by Dieter Plaetinck (Dieter_be) - Wednesday, 11 February 2009, 19:50 GMT
works on i686. also ported to aif

Loading...