<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Tech-Recipes - Latest Comments in creating a solaris 8 flash archive boot disk | Solaris system administration | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Tue, 14 Sep 2004 03:14:46 -0000</lastBuildDate><item><title>Re: creating a solaris 8 flash archive boot disk | Solaris system administration | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/461/creating-a-solaris-8-flash-archive-boot-disk/#comment-2767557</link><description>Hi.&lt;br&gt;&lt;br&gt;Just a comment on this otherwise nice script. The delete lines such as:&lt;br&gt;&lt;br&gt;# remove the packages from the Product directory &lt;br&gt;cd /opt/make_os/solaris_8/s0/Solaris_8/Product &lt;br&gt;rm -rf *&lt;br&gt;&lt;br&gt;and &lt;br&gt;&lt;br&gt;# remove the configuration files from the .install_config directory &lt;br&gt;cd /opt/make_os/solaris_8/s0/.install_config &lt;br&gt;rm *&lt;br&gt;&lt;br&gt;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:&lt;br&gt;&lt;br&gt;rm -rf /opt/make_os/solaris_8/s0/Solaris_8/Product/*&lt;br&gt;&lt;br&gt;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.&lt;br&gt;&lt;br&gt;&lt;br&gt;Just my 0.02$ :)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">unixdude</dc:creator><pubDate>Tue, 14 Sep 2004 03:14:46 -0000</pubDate></item></channel></rss>