Bug 1144 - Generated rc script for sshd forces non-existent shell.
Summary: Generated rc script for sshd forces non-existent shell.
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 4.2p1
Hardware: ix86 Linux
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-12 05:42 AEDT by Dave Levy
Modified: 2006-10-07 11:44 AEST (History)
0 users

See Also:


Attachments
Have configure check for the existence of /sbin/sh (1.12 KB, patch)
2006-01-12 18:44 AEDT, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Levy 2006-01-12 05:42:11 AEDT
I have just installed openssh on my Sun Cobalt Qube, running Linux. It is a Red Hat variant.

The shell interpreter for the rc script forces /sbin/sh. This seems to be defined in opensshd.init.in. This shell does not exist on this implementation of Linux. I have written about this in (much more) detail at http://blogs.sun.com/roller/page/DaveLevy/20060104. 

NB This would seem to me to be a common problem but I havn't found any references in the archives.

A simple check to see if there is /sbin/sh could be made and the first line of the script amended dependent on the result of the test. The copy statement, moving the generated script from the build directory to the installed directory may require to be managed by a similar test. The blog article above has code examples which I wrote and you are free to use.
Comment 1 Darren Tucker 2006-01-12 18:44:14 AEDT
Created attachment 1050 [details]
Have configure check for the existence of /sbin/sh

Getting configure to check for this is easy provided you're doing native builds and not cross-compiling.
Comment 2 Tim Rice 2006-01-13 09:34:56 AEDT
The openssh.init startup script was never intended to work on all platforms.
If you Cobalt Qube is a Red Hat variant, you may be better off with contrib/redhat/sshd.init

That said, if Darren wants to commit the patch, It's OK by me.
Comment 3 Darren Tucker 2006-01-30 00:23:25 AEDT
Patch applied, thanks.
Comment 4 Darren Tucker 2006-10-07 11:44:07 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.