DISQUS

DISQUS Hello! Tech-Recipes is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Tech-Recipes

Cookbook of Tech Tutorials
Jump to original thread »
Author

creating a solaris 8 flash archive boot disk | Solaris system administration | Tech-Recipes

Started by qdideas · 9 months ago

No excerpt available. Jump to website »

1 comment

  • Hi.

    Just a comment on this otherwise nice script. The delete lines such as:

    # remove the packages from the Product directory
    cd /opt/make_os/solaris_8/s0/Solaris_8/Product
    rm -rf *

    and

    # remove the configuration files from the .install_config directory
    cd /opt/make_os/solaris_8/s0/.install_config
    rm *

    are extremely dangerous. If for some reason the cd command fails (permission problems, missing directories etc), the next command will wipe the rootdisk clean (or at least every file in the directory the command is issued from and all directories below). A much better version would be to do the rm command directly on the directory:

    rm -rf /opt/make_os/solaris_8/s0/Solaris_8/Product/*

    In this case the rm command will fail if the directory doesn't exist, and no harm would be done. Another approach would be to test for the existence of the directory prior to issue the commands, and to exit with an error code if the check fails.


    Just my 0.02$ :)

Add New Comment

Returning? Login