PDA

View Full Version : Wrong interpreter specified in install scripts


galiyosha
09-06-2008, 05:26 AM
install.sh and functions.sh have /bin/sh specified as an interpreter. However, on systems, where /bin/sh is a plain Bourne shell (like Solaris 10), installation fails with the message of install.sh: test: argument expected because of line 972 in function.sh: if [ -e "$LSINSTALL_DIR/bin/lshttpd.dbg" ]; then
All runs fine if installation is invoked by bash install.sh.

Please correct the shebang line in your install scripts to point explicitly to bash.

OS: Solaris 10, 64-bit
LSWS 3.3.17 Standard

mistwang
09-07-2008, 05:31 PM
Bash may not available by default, even on some solaris distribution. Maybe use

if [ -f ... ]; then

instead to make it compatible with most shell.