Bug#270285: dosemu: unix.com -s fails to import env vars with an underscore
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ryan Underwood <nemesis@icequake.net> writes:
> On Mon, Sep 06, 2004 at 03:25:39PM +0100, Roger Leigh wrote:
>> 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.
>
> I did the exactly same thing as you, and here are my results:
> ----------------------------------------------------
> FreeCom version 0.82 pl 3 [Dec 10 2003 06:54:37]
OK, I've purged dosemu and dosemu-freedos and installed them from
scratch (current unstable), also using freecom 0.83 Beta 4. I've made
these changes:
/etc/freedos/config.sys:
shell=c:\freecom\command.com /e:1024 /p
/etc/dosemu/dosemu.conf:
$_layout = "uk"
$_hdimage = "freedos"
/usr/lib/freedos:
symlink /home/roger/freecom to freecom
/usr is read only, hence the need for the symlink (since freecom won't
work if command.com is r/o, and so the hdimage also needs to looks
writable too).
Running dosemu, tracing autoexec.bat:
C: HD1 Pri:1 CHS= 0-1-1 start = 0MB,size = 392
Kernel: allocated 41 Diskbuffers = 21812 Bytes in HMA
[dosemu EMS 4.0 driver installed]
FreeCom version 0.83 Beta 4 [Apr 02 2001]
Press F8 for trace mode, or F5 to bypass \autoexec.bat...
\autoexec.bat [Enter=Yes, ESC=No]
echo off [Enter=Yes, ESC=No]
path c:\bin;c:\gnu;c:\dosemu [Enter=Yes, ESC=No]
set HELPPATH=c:\help [Enter=Yes, ESC=No]
prompt $P$G [Enter=Yes, ESC=No]
unix -s DOSTMP [Enter=Yes, ESC=No]
unix -s DOSDRIVE_D [Enter=Yes, ESC=No]
if "/home/roger" == "" goto nodrived [Enter=Yes, ESC=No]
lredir d: linux\fs/home/roger [Enter=Yes, ESC=No]
D: = LINUX\FS/HOME/ROGER attrib = READ/WRITE
if "/tmp/dosemu.idmm1g/tmp" == "" goto dosver [Enter=Yes, ESC=No]
lredir e: linux\fs/tmp/dosemu.idmm1g/tmp [Enter=Yes, ESC=No]
E: = LINUX\FS/TMP/DOSEMU.IDMM1G/TMP attrib = READ/WRITE
set TEMP=E:\ [Enter=Yes, ESC=No]
Can not set environment variable "TEMP".
Environment full?
goto dosver [Enter=Yes, ESC=No]
unix -s DOSEMU_VERSION [Enter=Yes, ESC=No]
echo "Welcome to dosemu 1.2.1.0!" [Enter=Yes, ESC=No]
"Welcome to dosemu 1.2.1.0!"
unix -e [Enter=Yes, ESC=No]
C:\>
Notice the "set TEMP=E:\" fails, even though the environment is set
large enough. It works after startup is complete:
C:\>set TEMP=E:\
C:\>set
PATH=c:\bin;c:\gnu;c:\dosemu
COMSPEC=C:\FREECOM\COMMAND.COM
HELPPATH=c:\help
PROMPT=$P$G
DOSTMP=/tmp/dosemu.idmm1g/tmp
DOSDRIVE_D=/home/roger
DOSEMU_VERSION=1.2.1.0
TEMP=E:\
Removing the /e:1024 in config.sys makes the failure occur much sooner
(and then it goes crazy):
Kernel: allocated 41 Diskbuffers = 21812 Bytes in HMA
[dosemu EMS 4.0 driver installed]
FreeCom version 0.83 Beta 4 [Apr 02 2001]
Press F8 for trace mode, or F5 to bypass \autoexec.bat...
\autoexec.bat [Enter=Yes, ESC=No]
echo off [Enter=Yes, ESC=No]
path c:\bin;c:\gnu;c:\dosemu [Enter=Yes, ESC=No]
set HELPPATH=c:\help [Enter=Yes, ESC=No]
Can not set environment variable "HELPPATH".
Environment full?
prompt $P$G [Enter=Yes, ESC=No]
unix -s DOSTMP [Enter=Yes, ESC=No]
unix -s DOSDRIVE_D [Enter=Yes, ESC=No]
if "/home/roger" == "" goto nodrived [Enter=Yes, ESC=No]
lredir d: linux\fs/home/roger [Enter=Yes, ESC=No]
Dividnd Intl. Null pointer assignment
Dividnd Intl. Null pointer assignment
Dividnd Intl. Null pointer assignment
Dividnd Intl. Null pointer assignment
Dividnd Intl. Null pointer assignment
Dividnd Intl. Null pointer assignment
[... dosemu killed by me]
/e:2048 doesn't help either, and nor does /e:4096... /e:32768 causes
the same failure as above.
So, it looks like lack of environment space is at least part of the
problem (though "unix -s" doesn't print the environment full error.
Once the the shell is interactive, there is not problem however!
Regards,
Roger
- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFBPhejVcFcaSW/uEgRArtQAKDAjNEHbwo55wTB7TUsyaX1y1CRrgCeNBqH
B17Am6SJmK3KroU9AZLoyow=
=9EWp
-----END PGP SIGNATURE-----
Reply to: