LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 12-09-2003, 04:21 PM   #1
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Qmail Solaris 9 x86


To install qmail on a Solaris 9 x86 box I replaced the default shell "/usr/bin/sh" with "/usr/bin/bash" by issuing the commands "mv /usr/bin/sh /usr/bin/sh.old" and "ln -s /usr/bin/bash /usr/bin/sh". Anybody know how this may affect the system? What affect if any, will it have on the installation of standard SUNW packages? Is "bourne again" backwards compatible with the bourne shell?
 
Old 12-11-2003, 10:21 AM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
sh is one of those statically linked binaries that is very important if something goes awry on your system and you are booting into single user mode. Whether or not it will affect your systems operation will depend on how bash is built and how you partitioned your system. Why didn't you just modify the Qmail stuff to use bash?
 
Old 12-11-2003, 06:10 PM   #3
jdc2048
Member
 
Registered: Jul 2002
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
actually I think that is the /sbin/sh program that is the one that you want to run for single user mode. That should be the statically linked version. And yes, bash claims to be backward compatible with the original Bourne shell.
 
Old 12-12-2003, 04:33 AM   #4
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Original Poster
Rep: Reputation: 30
The package is daemontools-0.76, while unpacking the archive "automake" generates the "Makefile" which calls the standard shell "/bin/sh"( which is a symlink to "/usr/bin/sh" after compiling and installing, the software is incorrectly configured. Part of the program is executed by "init", every few minutes "init" echo's an error at the console stating that the "Command is respawning too rapidly". An alternative workaround suggested placing ">/dev/null" after the command in "/etc/inittab" but "ps -ef | grep command" shows that the program is not running, a google search turned up these points;

* init runs actions in inittab without any open descriptor.

* When /bin/sh opens "command", it gets 0 as the
descriptor associated with that file.

* Executing svscanboot, sh redirects descriptor 0 to
/dev/null (as instructed in svscanboot, line 6); the
next read attempt from svscanboot will result in an EOF.

* Since sh reads svscanboot with a 128-byte buffer, it
only sees the first 256 bytes of svscanboot.

The problem seems to be with the bourne shell? I did try with a standard account and set the shell "usermod -s /usr/bin/bash user" but the same error appeared. I had thought of modifying the scripts in daemontools, but I wanted a fast(lazy) workaround, this works ok, but I have not yet put the mail server into production.
 
Old 12-12-2003, 08:01 AM   #5
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by jdc2048
actually I think that is the /sbin/sh program that is the one that you want to run for single user mode. That should be the statically linked version.
Argh. Forgot the static stuff is in /sbin.

Last edited by stickman; 12-12-2003 at 08:03 AM.
 
Old 12-12-2003, 09:54 AM   #6
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Original Poster
Rep: Reputation: 30
Single user mode runs the su shell variable. For example here I have the root account set to use "bash" at level 1 "env" command returns "SHELL=/usr/bin/bash". Any suggestions regarding the workaround? Any alternatives?
 
Old 12-13-2003, 10:35 AM   #7
jdc2048
Member
 
Registered: Jul 2002
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
I'm kinda shooting in the dark here, but have you checked out the /etc/default/init file.
Is there anything in there that you could set that would assist with your command spawning from inittab?
I have found certain startup scripts need environment variables defined in that file in order to execute properly.
 
Old 12-15-2003, 07:33 AM   #8
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Original Poster
Rep: Reputation: 30
#ident "@(#)init.dfl 1.6 00/05/27 SMI"
#
# This file is /etc/default/init. /etc/TIMEZONE is a symlink to this file.
# This file looks like a shell script, but it is not. To maintain
# compatibility with old versions of /etc/TIMEZONE, some shell constructs
# (i.e., export commands) are allowed in this file, but are ignored.
#
# Lines of this file should be of the form VAR=value, where VAR is one of
# TZ, LANG, CMASK, or any of the LC_* environment variables.
#
TZ=Europe/Stockholm
CMASK=022
LC_COLLATE=da_DK.ISO8859-1
LC_CTYPE=da_DK.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=da_DK.ISO8859-1
LC_NUMERIC=da_DK.ISO8859-1
LC_TIME=da_DK.ISO8859-1

Not too sure if it will do the job, here is an example of a "/etc/default/init" from a Solaris 9 box, as you can see it mentions the use of shell variables, but it says they are ignored. I think I'll stick it out as is.

Last edited by mrhyde; 12-15-2003 at 07:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
great solaris website for newbies http://solaris-x86.org/ feetyouwell Solaris / OpenSolaris 2 12-06-2006 12:14 AM
Solaris 10 x86 Motherboars shizzy-t Solaris / OpenSolaris 5 07-06-2005 06:39 PM
Who has actually gotten Solaris 9 x86 To Install? g_goblin Solaris / OpenSolaris 13 12-24-2003 12:00 PM
solaris on an x86 Robert0380 Solaris / OpenSolaris 6 08-29-2003 02:34 AM
Solaris 9 for x86 systems cmf5150 Linux - Newbie 1 08-07-2003 10:13 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 10:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration