Automatic installation documentation
Chad C. Walstrom
chewie at wookimus.net
Wed Feb 27 17:43:04 CET 2002
On Wed, Feb 27, 2002 at 01:28:05PM +0100, Phil wrote:
> I've begun to write sth that output a LaTeX report giving details
> about the hardware...[snipped for brevity]...
Very cool. Perl or Python? Parsing the fai install logs?
> Does this already exists ?
Not that I know of.
> Btw, do you know a simple way to get the equivalent of dpkg -l (to get
> the list of packages installed with their version) but which is not
> truncated. (For the moment I have to parse myself
> /var/lib/dpkg/status.)
#!/bin/sh
dpkg=/bin/dpkg
# Set the column width
COLUMNS=132
export COLUMNS
# Run dpkg -l
$dpkg -l $@
Otherwise, I do a simple grep or egrep for info on specific packages:
#!/bin/sh
grep=/bin/grep
status=/var/lib/dpkg/status
# grep for a package and show status
do_grep() {
grep -A1 -E "Package:\.\*${1:-''}\$" $status
}
[ $# -eq 0 ] && {
do_grep
exit 0
}
while true
do
do_grep $1
[ $# -lt 2 ] && break
shift
done
Use awk to format, or search the current debian archives for a tool with
apt-cache search 'REGEX'.
--
Chad Walstrom <chewie at wookimus.net> | a.k.a. ^chewie
http://www.wookimus.net/ | s.k.a. gunnarr
Get my public key, ICQ#, etc. $(mailx -s 'get info' chewie at wookimus.net)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20020227/06f5e885/attachment.bin
More information about the linux-fai
mailing list