[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#270285: dosemu: unix.com -s fails to import env vars with an underscore



Package: dosemu
Version: 1.2.1-3
Severity: normal

If I want to import environment variables from the Linux environment
into the dosemu session using "unix -s varname", only variables without
an underscore are imported.

My /etc/freedos/autoexec.bat
@echo off
[snip lredired standard setup]

share
unix -r DOSCOMMAND


so the environment variable DOSCOMMAND will be run.  I have this batch
file in my homedir:

@ECHO OFF
REM Set up environment
unix -s FOO
unix -s BAR
unix -s BAZ
unix -s BAT
unix -s FOO_BAR
unix -s FOO_BAR
unix -s FOO_BAT
set
pause

Each environment variable is set in the parent shell.  The output reads
like this:

SHARE installed.
About to Execute : d:\blank1
COMSPEC=C:\COMMAND.COM
PATH=c:\bin;c:\gnu;c:\dosemu;d:\epicpos
HELPPATH=c:\help
PROMPT=$P$G
DOSTMP=/tmp/dosemu.udm2yf/tmp
DOSDRIVE_D=/home/blank
TEMP=E:\
DOSEMU_VERSION=1.2.1.0
FOO=foo
BAR=bar
BAZ=baz
BAT=bat
Press any key to continue ...

i.e. all the underscored envvars were missed.  In an existing DOS
application which uses the envvars "CSL-ACC", "CSL-CSBIG" and
"CSL-CSNRM", represented in the Linux environment as "CSL_ACC",
"CSL_CSBIG" and "CSL_CSNRM", only CSL_ACC is imported successfully (all
are then converted to the hyphenated form).  I'm unsure what makes
"CSL_ACC" an exception to the apparent "no underscores" rule.


What's really strange is this: if I run dosemu without setting
DOSCOMMAND, and then enter "blank1" as the command to run at the shell,
it runs perfectly:
$ dosemu
SHARE installed.
DOSEMU built-in command.com version  1.0

C:\>d:
D:\>blank1
COMSPEC=C:\COMMAND.COM
PATH=c:\bin;c:\gnu;c:\dosemu;d:\epicpos
HELPPATH=c:\help
PROMPT=$P$G
DOSTMP=/tmp/dosemu.fpjwlj/tmp
DOSDRIVE_D=/home/blank
TEMP=E:\
DOSEMU_VERSION=1.2.1.0
FOO=foo
BAR=bar
BAZ=baz
BAT=bat
FOO_BAR=foobar
FOO_BAT=foobat
Press any key to continue ...

D:\>


Wierd.  It looks like dosemu is not working properly until the shell
starts?


I've also found problems if DOSCOMMAND has arguments to the command e.g.
"command arg1 arg2".  The args seem to be dropped, though I need to
investigate this one further.  This also applies to running "dosemu
command arg1 arg2" with the appropriate unix command in autoexec.bat.


Regards,
Roger


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.6
Locale: LANG=en_GB, LC_CTYPE=en_GB

Versions of packages dosemu depends on:
ii  libc6                     2.3.2.ds1-13   GNU C Library: Shared libraries an
ii  libx11-6                  4.3.0.dfsg.1-4 X Window System protocol client li
ii  libxext6                  4.3.0.dfsg.1-4 X Window System miscellaneous exte
ii  slang1                    1.4.9dbs-6     The S-Lang programming library - r
ii  xbase-clients             4.3.0.dfsg.1-4 miscellaneous X clients
ii  xlibs                     4.3.0.dfsg.1-4 X Window System client libraries m
ii  xutils                    4.3.0.dfsg.1-4 X Window System utility programs

-- no debconf information



Reply to: