Josip Gracin stated:
< Shawn Walker wrote:
< >POSIX requires that you get a POSIX shell if you type "sh" after you
< >did setup a POSIX compliant PATH"
< >
< >So, there's nothing disturbing about this at all.
< 
< Shawn, I would appreciate an advice on the following situation then:
< 
< I'm trying to port a software called Asterisk to Solaris.  The software 
< uses XPG4-compliant shell scripts in its build process.  Those scripts 
< use the non-standard '#!/bin/sh' as their first line.  The scripts 
< accidentally work on currently supported platforms, but fail on Solaris 
< due to the fact that they use some XPG4 stuff which is not in Solaris 
< /bin/sh.

  This is the Asterisk PBX right ?

  Just compiled asterisk-1.2.9 almost out of the box[1] on Solaris (snv_42).

  Asterisk is primarily developed and tested on linux (re: the readme) it could
  be argued that you just need to run things from a bash shell.

  Asterisk also requires the use of gmake, since it makes use of gmake feautures
  and is thus not posix compliant...

  That and the shell scripts themselves call other binaries which assume that
  they're gnu binaries; eg it calls 'mv --force'.  Long getopts like these
  aren't posix compliant (correct me if I'm wrong) are they ?

< 
< So what do I do to make this work in Solaris?  Changing the scripts so 
< that they don't use all XPG4 features but only those which Solaris's 
< /bin/sh happens to implement is not an option.

  Asterisk seems to be dependant on gnu utils rather than posix compliant utils.

  This is familiar with a lot of software thats been primarily developed
  using on linux (and or other OSes) w/ gnu-utils/tools.

  btw, where in the asterisk source do you find anything like 'r=$((3 + 1))' ?
  The only script I found '((...))' was in a rc script that was written for the
  mandrake linux distro.

  Though if you're not talking about the Asterisk PBX then feel free to ignore
  what I just wrote :)

< 
< _______________________________________________
< opensolaris-discuss mailing list
< [email protected]

Regards,
-- 
Sean.
.

[1] needed ncurses, changed Makefile to point to ncurses location.
   In some subdir Makefiles, eg editline, call 'grep -q' (posix), and 'mv 
--force' (gnu)
   The apps/Makfile spawns an 'if [[ ... ]]' whereas in the pbx/Makfile, there
   is spawned an '[ ... ]'




_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to