On Wed, Nov 17, 2004 at 07:11:42PM +0100, Frans Pop wrote: > -( > - echo "# Inserted by languagechooser." > - echo "LANG_INST=\"$LOCALE\"" > - echo "LANGUAGE_INST=\"$LANGLIST\"" > -) >> /target/root/dbootstrap_settings > +DESTFILE="/target/root/dbootstrap_settings" > +echo "# Inserted by languagechooser." > $DESTFILE > +echo "LANG_INST=\"$LOCALE\"" >> $DESTFILE > +if [ -n "$LANGLIST" ] ; then > + echo "LANGUAGE_INST=\"$LANGLIST\"" >> $DESTFILE > +fi
This will overwrite instead of append to /target/root/dbootstrap_settings. > -( > - echo "LANG=\"$LOCALE\"" > - echo "LANGUAGE=\"$LANGLIST\"" > -) >> /target/etc/environment > -# If the locale isn't already valid, append it to locale.gen > -if chroot /target/ /usr/sbin/validlocale $LOCALE \ > - >> /target/etc/locale.gen 2>> $LOG ; then > - : # Nothing to do > -else > - # New locale added to locale.gen, generate it > - chroot /target /usr/sbin/locale-gen >> $LOG 2>&1 > +DESTFILE="/target/etc/environment" > +echo "LANG=\"$LOCALE\"" > $DESTFILE > +if [ -n "$LANGLIST" ] ; then > + echo "LANGUAGE=\"$LANGLIST\"" >> $DESTFILE > fi Likewise for /target/etc/environment. -- Matt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]