[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Here documents and CRLF
On Sat, Jun 12, 1999 at 09:18:58AM +1200, Mario Becroft wrote:
> On Fri, 11 Jun 1999, Guido Flohr wrote:
>
> > Not a guru, still answering.
> > Set UNIXMODE in n_aes.cnf. Then Toswin will have it already set and all
> > processes launched by Toswin.
>
> Well for example, I found that programs started from cron won't get the
> UNIXMODE environment variable. Also when logging in via telnet it would
> not be set either, although in each case it was set in mint.cnf. I somehow
These programs are special, at least cron. As far as I remember, the cron
daemon strips most of the environment for security reasons. If you run
scripts from the cron daemon, set UNIXMODE in the script, if you run
single commands, pass the variable on the command line:
UNIXMODE=/brUs my_backup_cmd -opts args
> imagined that setting it there would make it affect everything, but it
> seems that it doesn't. Is there something I can do to ensure that UNIXMODE
> will always be set, no matter how a program comes to be executed (from
> cron or telnet or anything at all).
There is no way to do that. For the telnet problem set UNIXMODE from
within the startup scripts in /etc (either profile or cshrc). Since
telnet will always launch a login shell these scripts will get evaluated.
>
> Maybe this doesn't have anything to do with the problem you describe. But
> the symptoms sounded very similar.
If you are really fed up with it, the only way to fix this is to recompile
crtinit.c from the MiNTLib (set the default io mode to binary there) and
then relink your software.
Just btw (I mentioned that a while ago), in the next MiNTLib I will
totally ignore UNIXMODE for setuid or setgid programs. For these
executables a default setting of "/brU" is always assumed and the
environment is not read. This will probably (as a side effect) avoid the
cron problems.
Ciao
Guido
--
http://stud.uni-sb.de/~gufl0000
mailto:gufl0000@stud.uni-sb.de