[Pkg-ltsp-devel] Bug#440854: ltsp-server: X settings lost during client boot

vagrant at freegeek.org vagrant at freegeek.org
Wed Sep 5 04:11:27 UTC 2007


On Tue, Sep 04, 2007 at 02:50:45PM -0600, Bryan Sutula wrote:
> In the chroot's /etc/init.d/ltsp-client-setup, X server settings are
> preseeded before running dexconf or dpkg-reconfigure.  The script omits
> the "-e" option to echo, so when run under bash, debconf-communicate
> doesn't do the right thing.  Please see attached patch.
 
> --- /opt/ltsp/i386/etc/init.d/ltsp-client-setup.orig    2007-09-03 15:38:40.000000000 -0600
> +++ /opt/ltsp/i386/etc/init.d/ltsp-client-setup 2007-09-04 11:22:18.000000000 -0600
> @@ -252,7 +252,7 @@
>  
>        # muzso: saving "preseeded" values
>        if [ -n "$debconf_commands" ]; then
> -        echo $debconf_commands | debconf-communicate $xserver_package
> +        echo -e $debconf_commands | debconf-communicate $xserver_package
>        fi
>  
>        # Autoconfigure using dexconf when using xdebconfigurator, or X

i'll have to experiment with this a little more...

ubuntu uses dash as the default /bin/sh ... but if our scripts are
dependent on dash being /bin/sh, we should explicitly put #!/bin/dash at
the top of the scripts. 

but dash's and bash's built-ins behave differently:

sh
sh-3.1$ echo "\tfoo\t"
\tfoo\t
sh-3.1$ echo -e "\tfoo\t"
        foo
sh-3.1$ exit

dash
$ echo "\tfoo\t"
        foo     
$ echo -e "\tfoo\t"
-e      foo     

we could use /bin/echo -e to get consistant
behavior for both shells, at a small cost of a little bit of external
binary access.

live well,
  vagrant




More information about the Pkg-ltsp-devel mailing list