Current Issue


Table of contents

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 12.0

Version 12.0 delivers every issue of Sys Admin from 1992 through 2006 and every
issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!

Sys Admin Magazine > Archives > 2001 > December 2001

Questions and Answers

Amy Rich

Q. My Ultra 10 box running Solaris 7 is a JumpStart server with a Solaris 8 01/00 release image on it. I want the latest features of Solaris, though, so I downloaded the maintenance upgrade (MU) from SunSolve. Can I “patch” my JumpStart image as I originally intended? If so, how? The install_mu shell script was obviously intended to upgrade a running OS, and I see nothing in the accompanying documentation of any relevance to upgrading a JumpStart image.

A. No, you cannot easily patch the JumpStart image on your disk. The maintenance updates are provided as a series of patches to the base operating system. What you can do is apply the maintenance update patches on each of your newly jumpstarted machines using one of your post install scripts, just like you would with the recommended patch set.

The best course of action, though, is to just install a new JumpStart image from the latest ISO images instead of using the maintenance updates. That way you’ll have the new base OS instead of a patched older base OS.

Q. I’m creating a bash script that’s supposed to do things to people’s home directories. Root runs this script and gives the username as an argument on the command line. In the script, I’m trying to use ~username to access the user’s home directory like this:

#!/usr/local/bin/bash

ls ~$1

Instead of seeing the contents of the user’s directory, I get the output:

ls: ~username: No such file or directory

Where “username” is the argument that was passed in to the script. If I hardcode the script, everything works fine:

#!/usr/local/bin/bash

ls ~username

Why isn’t it working when I pass in the username, and why do I get an error saying that it can’t find ~username when ~username is clearly there and works when it’s hardcoded? How can I make this work so I can operate on user’s home directories?

A.<>




MarketPlace

�Six Sigma� Certified?
100% Online-Six Sigma Certificate From Villanova -Find Out More Now.

Project Management-Online
Nation's Leading Online PMP Course From Villanova-Find Out More Now.

Flowcharts from C/C++ code -- Free trial download
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.

Automate Software Builds with Visual Build Pro
Easily create an automated, repeatable process for building and deploying software.

Wanna see your ad here?