_____

Arcane little sysadmin tricks

(Frequently, I can solve a problem by searching the web, because somebody else has already experienced my problem, solved it, and documented the solution on a webpage. Here I have tried to return the favor, and document a solution I've had to cobble together on my own.)

(Nov 2007) Figuring out the ipconfig command in Mac OS X

Problem

The manpage for ipconfig is typically cryptic. It appears that it can be used to release/renew the DHCP address of the primary Ethernet interface (en0) as follows:
sudo ipconfig set en0 NONE   # to release
sudo ipconfig set en0 DHCP   # to renew
However, this doesn't appear to be a true release/renew; rather, it looks more like a heavier "turn off/turn on" such as:
sudo ifconfig en0 down   # to turn off
sudo ifconfig en0 up   # to turn on
However, the ipconfig commands seem to work more reliably than the ifconfig commands; I found one occurrence of Mac OS X turning en0 back on spontaneously after I had used ifconfig to bring it down.

Solution

It looks like the ipconfig command may be used for DHCP diagnostics as well, but the syntax is even more cryptic:
ipconfig getoption en0 1   # returns assigned netmask
ipconfig getoption en0 3   # returns assigned ip address
ipconfig getoption en0 6   # returns first assigned domain name server
ipconfig getoption en0 15   # returns assigned domain name
ipconfig getoption en0 44   # returns first assigned Microsoft WINS server
ipconfig getoption en0 51   # returns an integer, I'm not sure what it means
ipconfig getoption en0 53   # returns an integer, I'm not sure what it means
ipconfig getoption en0 54   # returns an IP addres, I'm not sure what it means - the assigning DHCP server's address, perhaps?
ipconfig getoption en0 58   # returns an integer, I'm not sure what it means

I found a little bit more of a writeup about this by A. P. Lawrence.


(Aug 2003) Installing a queue for an HP Jetdirect printer on Solaris 9

Problem

HP no longer offers their JetAdmin or WebJetAdmin tool for Solaris, but they do make available a Solaris package called "HP Jetdirect Printer Installer." I downloaded that from HP's web site as a file named SOLe134.PKG, installed it, and attempted to run the installer (/usr/bin/hppi) to install the print queue. After answering the prompts, it failed with the message:
The print scheduler is not running, cannot proceed!

Solution

I created a null print queue using the single Solaris command:
lpadmin -p null -v /dev/null

That was enough to get the print scheduler running; /usr/bin/hppi added my real queue with no trouble after that.



_ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _

.