MailScanner install failed on a "tail"
Brad Beckenhauer
brad at BECKENHAUER.COM
Thu Sep 2 17:51:04 IST 2004
Thanks Julian,
I did some more search this morning on this issue and found that my tail
install issue revolves around the "Posix standard" that is running on the
system.
In my case, I'm running a more "bleeding-edge" distribution that comforms
to the newer POSIX standard `200212`.
In this distro, the default _POSIX2_VERSION environment setting is "not
set" and thus is defaulting to version 200212, which does not allow the
usage of the "tail -1", but specifies a more strict usage of "tail -n -1".
ref: (as defined in /usr/include/unistd.h )
Posix reference:
http://lists.gnu.org/archive/html/bug-coreutils/2004-01/msg00117.html
<snip>
Two values are currently supported for `_POSIX2_VERSION': `199209' stands
for POSIX 1003.2-1992, and `200112' stands for POSIX 1003.1-2001. For
example, if you are running older software that assumes an older version of
POSIX and uses `sort +1', you can work around the compatibility problems by
setting `_POSIX2_VERSION=199209' in your environment.
</snip>
My solution was to tell Posix to use a less strict interpretation of the
tail command by issueing the following command:
# export _POSIX2_VERSION=199209
This allowed me to install MailScanner without error or modifying the
install script (Yea!).
Another possibility as pointed out in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-01/msg00124.html
<snip>
Thus, he can replace "tail -1" with "sed -n '$p'",...
</snip>
the author finishes with:
</snip>
Admittedly this is a hassle in the short run, so setting
_POSIX2_VERSION=199209 may be his best bet in the short run.
</snip>
Conclusion:
I now have the option of being able to run the MailScanner install script
without having to modify the script(Great!) Perhaps, also, substitution of
the tail command with the "sed option" is an option for consideration in
the install script to allow those systems using the more strict `200112'
Posix standard to do an install without having to "set the environment".
Another possible option, would be to "temporarily" set the POSIX2 version
in the install script during the install.
Thanks, I got an eduction out of researching this issue.
Brad
>>> Julian Field<mailscanner at ECS.SOTON.AC.UK> 9/2/2004 8:34:10 AM >>>
However, not all "tail"s support "-n". Only very fussy builds of tail (e.g.
on Gentoo apparently) don't support the "-1" syntax, everyone else does.
At 13:56 02/09/2004, you wrote:
>A quick search/replace in the install.tar-fns.sh script " %s/tail -
>1/tail -n -1/g "and re-ran the install.sh.
>
>Version of "tail" I'm running is: 5.2.1
>tail: `-1' option is obsolete; use `-n 1'
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).
More information about the MailScanner
mailing list