Published shell scripting standards

Published shell scripting standards

Post by dwmy.. » Thu, 30 Mar 2000 04:00:00



I'm on a committee to produce a corporate wide shell scripting
standard, for sh, ksh, perl, .profile files, and as well set
standards for the CDE. With regard to the former, which is on topic
for this, I'm looking for documents that define a coding standard.
I'm not concerned whether these are 'perfect' documents, but sources
or guides to good coding practices (urls preferred) would be
appreciated.

There will be an emphasis on startup and shutdown scripts, though
honestly I expect this to be boilerplate. I'm more interested in
naming conventions, function conventions, good practice,
documentation conventions, legibility conventions, etc.

The computers affected by such a standard would be Sun Solaris machines
and HP 9000 machines running HP-UX.

I'm curious how people formally resolve the issue raised by HP of
location of startup scripts, as they say user made scripts located in
/sbin/init.d are not guaranteed to survive an operating systems
upgrade.

David.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Published shell scripting standards

Post by Christopher M. Arnol » Fri, 31 Mar 2000 04:00:00


My group has gone with the /etc/init.d/<service> [start|stop|others]
mentality.  All of it is done with simple case statements, is consistent in
format and location, is easy to use by operators and newbies, provides you
the ability to log starting and stopping of services to syslogd if the
application doesn't do it and works in well with the Solaris way of doing
things.

Can't say much about the HP way.

Chris


> I'm on a committee to produce a corporate wide shell scripting
> standard, for sh, ksh, perl, .profile files, and as well set
> standards for the CDE. With regard to the former, which is on topic
> for this, I'm looking for documents that define a coding standard.
> I'm not concerned whether these are 'perfect' documents, but sources
> or guides to good coding practices (urls preferred) would be
> appreciated.

> There will be an emphasis on startup and shutdown scripts, though
> honestly I expect this to be boilerplate. I'm more interested in
> naming conventions, function conventions, good practice,
> documentation conventions, legibility conventions, etc.

> The computers affected by such a standard would be Sun Solaris machines
> and HP 9000 machines running HP-UX.

> I'm curious how people formally resolve the issue raised by HP of
> location of startup scripts, as they say user made scripts located in
> /sbin/init.d are not guaranteed to survive an operating systems
> upgrade.

> David.

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

Published shell scripting standards

Post by dwmy.. » Fri, 31 Mar 2000 04:00:00




Quote:> My group has gone with the /etc/init.d/<service> [start|stop|others]
> mentality. All of it is done with simple case statements, is
> consistent in format and location, is easy to use by operators and
> newbies, provides you the ability to log starting and stopping of
> services to syslogd if the application doesn't do it and works in well
> with the Solaris way of doing things.

> Can't say much about the HP way.

> Chris

It is pretty much the same, Chris. Scripts are located in /sbin/init.d,
scripts use a three digit naming convention as opposed to the two
digit naming convention Sun uses. Just, HP explicitly states in its
documentation that on an operating systems upgrade, they do not
guarantee the survivability of any scripts you've placed in
/sbin/init.d.

David.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

1. patents!!! publish, publish, publish.

I am not philosophically against software patents when something is truly
valuable, but I am against what is currently being patented. Stupid little
techniques which are obvious to anyone skilled in the art.

Take the patent on hostname session management. It says that using the session
name in the hostname of the URL is patented. For instance:

session1232233.mydomain.com/index.html

is patented. The problem with it is that it wasn't possible until named was
able to use wildcards. It didn't take any real inventiveness. It is a tiny,
minuscule thing added to a much larger open system: named.

The only way to combat this is to write and publish these stupid little things
as we think of them. The average open source developer, or closed source
developer, does not have the resource to pursue a patent unless funded by a
company, but we do have the resource to publish!

Once published, and a date becomes a verifiable public record, we can create a
history of prior art. With prior art, we can fight non-sense patents on trivial
techniques that doubtless we have all though about.

2. How to restore certain files from afio backup ?

3. Publishing a shell script

4. SB LIVE! Support

5. Remote tape streamer permissions

6. Any coding standards for shell scripts?

7. Oops - 2.4.17rc1 (with iptables 2.4.6)

8. Shell Scripting Standards

9. changing standard input in Korn Shell script

10. A shell scripting standards document

11. [Fwd: Shell Scripting Standards]

12. Any coding standards for shell scripts?