Re: "Boot time scripts should have an .sh extension"

From: Reg Quinton (reggers_at_ist.uwaterloo.ca)
Date: 11/14/03

  • Next message: Joep Vesseur: "Re: "Boot time scripts should have an .sh extension""
    To: "Paul Greene" <techlists@comcast.net>, <focus-sun@securityfocus.com>
    Date: Fri, 14 Nov 2003 06:31:29 -0500
    
    

    > I got the following out of a security checklist, but am skeptical. Can
    > anyone provide some feedback as to its validity (or lack of).

    It's definitely the case that Solaris rc* scripts (which execute start and
    stop scripts in similarly named directories) will execute .sh files in the
    same shell and all others in a new shell. The rc* scripts are simple shell
    scripts that you can read to verify that.

    On older versions of Solaris you'd change the umask of processes started at
    boot time by creating a umask.sh script that gets run early in the boot
    sequence. For example

    @ist[106]% more /etc/rc3.d/S00umask.sh
    umask 022

    On recent versions of Solaris the preferred method is to set it in
    /etc/default/init (but the previous strategy still works).


  • Next message: Joep Vesseur: "Re: "Boot time scripts should have an .sh extension""

    Relevant Pages

    • Re: Which shell?
      ... > I use bash, primarily, but the default on Solaris is sh. ... I start writing shell scripts in sh. ... I would not write scripts in bash because of the External ...
      (comp.unix.solaris)
    • Re: Which shell?
      ... > I use bash, primarily, but the default on Solaris is sh. ... > for the lowest-common-denominator shell? ... old scripts written for the Bourne shell. ...
      (comp.unix.solaris)
    • Re: Which shell?
      ... >> I can't think of a single good reason why sh on Solaris is still ... >> the Bourne shell rather than the POSIX shell, ... > It's about backward compatibility with existing scripts. ... scripts, which were written for Bourne shell, would not work under the ...
      (comp.unix.solaris)
    • Starting java at boot time u
      ... I would like to know how java starts at boot time on a Solaris ... I do not see any S* scripts in the rc directories and the ...
      (comp.unix.solaris)
    • Re: [Long] about ksh93 (Was: Bourne Shell Programming on Windows)
      ... Are you saying that David Korn is an unitiated or ignorant ksh ... > You provided one obscure example that does not occur in scripts. ... > in every shell. ... that should be teached in every shell programming book. ...
      (comp.unix.shell)