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
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
|
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
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
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" \