#!/bin/sh # # @(#) sysinfo2html 12.1 97/11/17 # # Copyright (c) 1997 The Santa Cruz Operation, Inc.. All Rights Reserved. # THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE SANTA CRUZ OPERATION INC. # The copyright notice above does not evidence any actual or intended # publication of such source code. # # sysinfo2html - script to generate some HTML code from system information # gathered during startup # INC_DIR=/usr/ns-home/docs/include [ -d $INC_DIR ] || mkdir -p $INC_DIR node_name=`uname -n` #host=`nslookup $node_name | grep Name | awk ' { print $2 } '` host=`/usr/ucb/hostname` echo $host > $INC_DIR/hostname.inc # Determine if Tarantella is installed and set login HREF accordingly if [ -d /opt/tarantella ] then loghref="http://$host/tarantella" else loghref="telnet://$host" fi echo "\ Login" > $INC_DIR/ttalogin.inc echo "" > $INC_DIR/scohelp.inc /usr/sbin/prtconf | grep -v "SYSTEM CONFIGURATION" | grep -v "80387" | awk \ ' BEGIN { printf "

System Configuration
\n

\n

\n" } { while ( ( getline x ) > 0) { if ( x != "" ) { if ( match(x, ":") > 0 ) { printf "
%s
\n", x } else { printf "
%s
\n", x } } else { printf "

\n" } } } END { printf "

\n" } ' > $INC_DIR/prtconf.inc echo $node_name > $INC_DIR/nodename.inc boot_line=`who -b` boot_time=`echo $boot_line | awk ' { print $4, $5, "at", $6 } '` echo $boot_time > $INC_DIR/boottime.inc