[scponly] Minor bug in setup_chroot.sh
Hideyuki KURASHINA
rushani at bl.mmtr.or.jp
Tue Dec 27 11:20:57 EST 2005
>>> On Tue, 27 Dec 2005 16:41:17 +0100, "Helmut Schneider" <jumper99 at gmx.de> said:
> From: "Hideyuki KURASHINA" <rushani at bl.mmtr.or.jp>
> >
> >>>> On Tue, 27 Dec 2005 16:05:41 +0100, "Helmut Schneider"
> >>>> <jumper99 at gmx.de> said:
> >
> >> Please change the following near line 74:
> >>
> >> -elif
> >> +else
> >
> > I encountered same problem, plus test(1) does not understand "=="
> > (at least FreeBSD).
>
> I don't encounter this problem:
Strange.
$ if [ `uname -s` == "FreeBSD" ]; then echo yes; else echo no; fi
[: FreeBSD: unexpected operator
no
$ if [ `uname -s` = "FreeBSD" ]; then echo yes; else echo no; fi
yes
$ uname -sr
FreeBSD 5.4-RELEASE-p8
$ if [ `uname -s` == "FreeBSD" ]; then echo yes; else echo no; fi
[: FreeBSD: unexpected operator
no
$ if [ `uname -s` = "FreeBSD" ]; then echo yes; else echo no; fi
yes
$ uname -sr
FreeBSD 6.0-RELEASE
# if [ `uname -s` == "FreeBSD" ]; then echo yes; else echo no; fi
no
# if [ `uname -s` = "FreeBSD" ]; then echo yes; else echo no; fi
no
# uname -sr
OpenBSD 3.8
Since manual page of test(1) doesn't note "==" is allowed strings
comparison explicitly (both FreeBSD and OpenBSD), I suppose using
"=" for that purpose would be more portable even if it works.
Regards,
-- rushani
More information about the scponly
mailing list