# HG changeset patch # User Noah Evans # Date 1316432632 -7200 # Node ID 7f87e32b0bdbf4e56ec39984c7d006e15729bd43 # Parent 92a3bab230c599573832ea2ff01819f29c3e1425 pxeof: a utility command for looking up systems in /cfg/pxe. Originally from Erik Quanstrom. R=nix-dev, nemo CC=nix-dev http://codereview.appspot.com/5061043 diff -r 92a3bab230c5 -r 7f87e32b0bdb rc/bin/pxeof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rc/bin/pxeof Mon Sep 19 13:43:52 2011 +0200 @@ -0,0 +1,14 @@ +#!/bin/rc +rfork e + +if(~ $1 '-'*){ + echo 'usage: pxeof [host ...]' >[1=2] + exit usage +} +for(i) + for(e in `{ndb/query -m sys $i ether}){ + pxe = /cfg/pxe/$e + if(test -e $pxe) + B $pxe + } +exit '' diff -r 92a3bab230c5 -r 7f87e32b0bdb sys/man/1/pxeof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sys/man/1/pxeof Mon Sep 19 13:43:52 2011 +0200 @@ -0,0 +1,16 @@ +.TH PXEOF 1 +.SH NAME +pxeof \- get the /cfg/pxe initialization file(s) of a host +.SH SYNOPSIS +.B pxeof sysname... +.SH DESCRIPTION +.I Pxeof +takes a list of system names as an argument and then finds the +ethernet address that correspond to that system name in the +.IR ndb (2) +database. It then uses +.IR plumb (1) +on the configuration files corresponding to those ethernet addresses in +the /cfg/pxe directory. +.SH SOURCE +.B /rc/bin/pxeof