On Mon, Jun 16, 2008 at 03:24:26PM -0400, James Carlson wrote: > Ceri Davies writes: > > On Mon, Jun 16, 2008 at 10:04:42AM -0400, James Carlson wrote: > > > > > The existing /etc/rc*.d stuff is there so that software that *must* > > > run on older versions of Solaris (either because it was originally > > > written there and never updated for S10 or newer, or because it's > > > still supported on those old versions) can still run. > > > > > > Since that's the purpose, the constraints of S9 and older here are > > > quite important for the discussion. > > > > > > And on S9, if you put "#!/bin/ksh" at the top of your rc script, it > > > won't work. Never has, never will. > > > > Hmm. I agree that changing it probably isn't a good idea, but there's a > > subtle difference on S10 as Nico pointed out explicitly: the only way to > > get a binary or non-/bin/sh script to be executed correctly on S10 is to > > call it S99foo.sh, which is just plain weird. > > Not only weird, but an undocumented side-effect of the implementation. > Where does anything say that ".sh" is even supported? > > > I think that at the very > > least this deserves a NOTE in a (which?) manpage, even if it's just a > > statement that everything is expected to be /bin/sh scripts. > > /etc/init.d/README has this documentation. > > > > Note that these supposed rc scripts could never have been run on S10 > > > or anything older, because they won't work. So, they must have either > > > never been tested on Solaris at all (in which case it's hard to see > > > how they're supported), or they're specifically designed for > > > OpenSolaris. > > > > Who says they're supported? Numerous vendors will quite happily give > > you an rc script that runs on Linux and expect you to take it from > > there. In my case, my backup guys had used the exact same script on my > > Solaris machines as they do on other folk's Linux boxes (#!/bin/bash, > > natch). > > In that case, what you're doing is called "porting." Yes, even if all > that you need to do is rewire the rc script because it's not out-of- > the-box ready for Solaris, I claim that this is porting. > > The most trivial but valid port is probably this: > > cat >/etc/init.d/mything <<EOF > #!/sbin/sh
*bzzt!* /bin/sh, thank you, very much. > /path/to/mything/rc-script $* > EOF > chmod +x /etc/init.d/mything > ln -s ../init.d/mything /etc/rc3.d/S99mything > ln -s ../init.d/mything /etc/rcS.d/K00mything > > ... but there are probably better ports that can be done. I don't > think I agree that rewriting the legacy support for rc scripts is a > necessary or desirable component of that. It's not clear that it'd > even work right, as it obviously assumes that all of the bits install > the same way on Solaris as on these other systems (the paths are the > same), and may well make many other assumptions. Not given "even if all that you need to do is rewire the rc script". You're flapping between extremes. Ceri -- That must be wonderful! I don't understand it at all. -- Moliere -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20080616/429b9e2c/attachment.bin>