add hpasm
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1958 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
parent
d7fd10d1b6
commit
28523d09e1
45
app-admin/hpasm/ChangeLog
Normal file
45
app-admin/hpasm/ChangeLog
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# ChangeLog for app-admin/hpasm
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
|
||||||
|
*hpasm-7.4.0.56 (14 Dec 2005)
|
||||||
|
|
||||||
|
14 Dec 2005; Jan Seidel <jseidel@tuxus.com> hpasm-7.4.0.56.ebuild:
|
||||||
|
new hp tools version 7.4 (amd64)
|
||||||
|
|
||||||
|
09 Sep 2005; Jan Seidel <jseidel@tuxus.com> hpasm-7.3.0.58.ebuild;
|
||||||
|
new hp tools version 7.3 (kernel 2.4 and 2.6)
|
||||||
|
|
||||||
|
28 Jul 2004; Jan Seidel <tuxus@gentoo.org> hpasm-7.1.0.12.1.ebuild:
|
||||||
|
new compaq tools version 7.1
|
||||||
|
|
||||||
|
29 Jun 2004; Aron Griffis <agriffis@gentoo.org> hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
sync IUSE (+snmp)
|
||||||
|
|
||||||
|
06 Jun 2004; Daniel Black <dragonheart@gentoo.org> +metadata.xml,
|
||||||
|
hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
QA - IUSE fix
|
||||||
|
|
||||||
|
30 May 2004; Robin H. Johnson <robbat2@gentoo.org>
|
||||||
|
hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
mailx move
|
||||||
|
|
||||||
|
30 Mar 2004; Donnie Berkholz <spyderous@gentoo.org>;
|
||||||
|
hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
Modifying reference to xfree in einfo.
|
||||||
|
|
||||||
|
16 Mar 2004; Seemant Kulleen <seemant@gentoo.org> hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
leet find syntax thanks to spyderous
|
||||||
|
|
||||||
|
16 Mar 2004; Seemant Kulleen <seemant@gentoo.org> hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
switch to using rpm.eclass, which fixes bug #32872 by JF Burdet
|
||||||
|
<jean-francois.burdet@adm.unige.ch>. Also, fixed up MY_P to make this more
|
||||||
|
resilient to version bumps upstream. I have no idea what bug #22015 is all
|
||||||
|
about though. Additionally, the install is a bit changed, no need to
|
||||||
|
explicitly install stuff when a cp -a will do.
|
||||||
|
|
||||||
|
*hpasm-6.30.0.12-r1 (24 Jun 2003)
|
||||||
|
|
||||||
|
24 Jun 2003; Joshua Brindle <method@gentoo.org> hpasm-6.30.0.12-r1.ebuild:
|
||||||
|
initial ebuild submitted by Brett Simpson <simpsonb@impmail.dnsalias.com>
|
||||||
|
|
11
app-admin/hpasm/Manifest
Normal file
11
app-admin/hpasm/Manifest
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
AUX functions 10068 RMD160 e79d43bf71300162a0808694340e2b59ee772204 SHA1 dfc1279392fa57adcf32c7ccbfa7aa0d8b7d3262 SHA256 8af78b2e83dc736d4c8b1f50dd8aabd237710c3bf02e416d981bbd3bd072e7aa
|
||||||
|
AUX hpasm 375 RMD160 36696e87e61ca83b2e00562cd9a908243b514615 SHA1 11a64e299c299f5b43f005a8a4b539cbd2e3d986 SHA256 20a295f7141d525c0090ec15352d939b4d31ec84b39ba433d9ff6544a1c4a6a8
|
||||||
|
AUX hppasswd 656 RMD160 e3b2ccbcdc32aa8dc801af269503f716f999c676 SHA1 df3213995e46064eba2ad51cfc175c6779f323a2 SHA256 98cc7ad9ccc6f6b8c0a1a906a47fc2df18aeecdd434beb1777fc478b14e2cb19
|
||||||
|
AUX initlog 38971 RMD160 1bf62bb0b4e9ca214e614af0b97ceb309d944e0d SHA1 24bc663be2cf563914df666577fe8b3196beee9e SHA256 431a9d797829fec3ca65624873f2fa30c34ab573e34782859b2ded6bbd7321a1
|
||||||
|
AUX initlog.conf 658 RMD160 180b0d54b7c7fbc643d1a5ea711bb13c968f4a05 SHA1 cc8eb7dc73d6c76ad5a9767a727fc4cceb8cefe0 SHA256 4e1f1376b55da911ab8eac9ece6816b09fe8866cc85cf1e533450422d68801d6
|
||||||
|
AUX snmpd.conf 15351 RMD160 5b26ad923aa39e6c65182ff8dd324ecf835f7447 SHA1 8344a93424d38aeaa061f2263b4e66f2717cfecf SHA256 d0d9e21ec0b1dc506665102f9c6f0d899016274d4798b24699de8f05b2d9e61c
|
||||||
|
DIST hpasm-7.7.0-115.sles10.i586.rpm 5703748 RMD160 307015a951d620a5872acc99bb0a769c47f87d8a SHA1 97a0756aa33645c4692a6391e97c5ed31b57f38b SHA256 ac1891320e8d4046ad935e350a0256733b5e5f09cf0a7c85d0b2b2c7d4d1c785
|
||||||
|
DIST hpasm-7.7.0-115.sles10.x86_64.rpm 5861960 RMD160 be2ce859fc33c0df6af33b1701f4b0f9a306136b SHA1 ae9645c2f54183b098f151c756b5c14b0146f3b0 SHA256 984f6443007e93f76d73bfabc35e16dead48a95f2e45c217343aa4f55e32a4fa
|
||||||
|
EBUILD hpasm-7.7.0.115.ebuild 6598 RMD160 a8a458808a14594602e589041259ecc5575d53a9 SHA1 3b4e430d2752569e032b666f51b2fc77bac2f28f SHA256 9e9b1bb4c27077c34946b52391933e90a3a3238003c726a8c14fa749e4874c20
|
||||||
|
MISC ChangeLog 1567 RMD160 0d21c86d21ec705813ee00dbfc2401599dd1d7de SHA1 146ed0c6cc90409bacd472605500b4eaf38eb9de SHA256 1a4c10dd7ee96def51bdd8331eaba5a237be9d0b275b281dd3891307096be50c
|
||||||
|
MISC metadata.xml 310 RMD160 5b59fc85d3bafae0872cf691e5f032bac39ba539 SHA1 bdd3f2bc135db7a1475e69cf818c6644a6146d3f SHA256 39e1273dd60bd3ceb460e9366a648c8fa21db1c292df4573e69f41cf6c84f6fc
|
454
app-admin/hpasm/files/functions
Normal file
454
app-admin/hpasm/files/functions
Normal file
@ -0,0 +1,454 @@
|
|||||||
|
# -*-Shell-script-*-
|
||||||
|
#
|
||||||
|
# functions This file contains functions to be used by most or all
|
||||||
|
# shell scripts in the /etc/init.d directory.
|
||||||
|
#
|
||||||
|
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
|
||||||
|
# Hacked by: Greg Galloway and Marc Ewing
|
||||||
|
#
|
||||||
|
# i18n originally by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
|
||||||
|
# Wanderlei Antonio Cavassin
|
||||||
|
|
||||||
|
TEXTDOMAIN=initscripts
|
||||||
|
TEXTDOMAINDIR=/etc/locale
|
||||||
|
|
||||||
|
# Make sure umask is sane
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
# Set up a default search path.
|
||||||
|
PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# Get a sane screen width
|
||||||
|
[ -z "${COLUMNS:-}" ] && COLUMNS=80
|
||||||
|
|
||||||
|
[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="`/sbin/consoletype`"
|
||||||
|
|
||||||
|
if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" ] ; then
|
||||||
|
. /etc/sysconfig/i18n
|
||||||
|
if [ "$CONSOLETYPE" != "pty" ]; then
|
||||||
|
case "${LANG:-}" in
|
||||||
|
ja_JP.eucJP|ko_KR.eucKR|zh_CN.GB2312|zh_TW.Big5|zh_CN.GB18030)
|
||||||
|
unset LANG;;
|
||||||
|
*)
|
||||||
|
export LANG
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
export LANG
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read in our configuration
|
||||||
|
if [ -z "${BOOTUP:-}" ]; then
|
||||||
|
if [ -f /etc/sysconfig/init ]; then
|
||||||
|
. /etc/sysconfig/init
|
||||||
|
else
|
||||||
|
# This all seem confusing? Look in /etc/sysconfig/init,
|
||||||
|
# or in /usr/doc/initscripts-*/sysconfig.txt
|
||||||
|
BOOTUP=color
|
||||||
|
RES_COL=60
|
||||||
|
MOVE_TO_COL="echo -en \\033[${RES_COL}G"
|
||||||
|
SETCOLOR_SUCCESS="echo -en \\033[1;32m"
|
||||||
|
SETCOLOR_FAILURE="echo -en \\033[1;31m"
|
||||||
|
SETCOLOR_WARNING="echo -en \\033[1;33m"
|
||||||
|
SETCOLOR_NORMAL="echo -en \\033[0;39m"
|
||||||
|
LOGLEVEL=1
|
||||||
|
fi
|
||||||
|
if [ "$CONSOLETYPE" = "serial" ]; then
|
||||||
|
BOOTUP=serial
|
||||||
|
MOVE_TO_COL=
|
||||||
|
SETCOLOR_SUCCESS=
|
||||||
|
SETCOLOR_FAILURE=
|
||||||
|
SETCOLOR_WARNING=
|
||||||
|
SETCOLOR_NORMAL=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${BOOTUP:-}" != "verbose" ]; then
|
||||||
|
INITLOG_ARGS="-q"
|
||||||
|
else
|
||||||
|
INITLOG_ARGS=
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if $pid (could be plural) are running
|
||||||
|
checkpid() {
|
||||||
|
local i
|
||||||
|
|
||||||
|
for i in $* ; do
|
||||||
|
[ -d "/proc/$i" ] && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# A function to start a program.
|
||||||
|
daemon() {
|
||||||
|
# Test syntax.
|
||||||
|
local gotbase= force=
|
||||||
|
local base= user= nice= bg= pid=
|
||||||
|
nicelevel=0
|
||||||
|
while [ "$1" != "${1##[-+]}" ]; do
|
||||||
|
case $1 in
|
||||||
|
'') echo $"$0: Usage: daemon [+/-nicelevel] {program}"
|
||||||
|
return 1;;
|
||||||
|
--check)
|
||||||
|
base=$2
|
||||||
|
gotbase="yes"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--check=?*)
|
||||||
|
base=${1#--check=}
|
||||||
|
gotbase="yes"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--user)
|
||||||
|
user=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
--user=?*)
|
||||||
|
user=${1#--user=}
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--force)
|
||||||
|
force="force"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
[-+][0-9]*)
|
||||||
|
nice="nice -n $1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*) echo $"$0: Usage: daemon [+/-nicelevel] {program}"
|
||||||
|
return 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Save basename.
|
||||||
|
[ -z "$gotbase" ] && base=${1##*/}
|
||||||
|
|
||||||
|
# See if it's already running. Look *only* at the pid file.
|
||||||
|
if [ -f /var/run/${base}.pid ]; then
|
||||||
|
local line p
|
||||||
|
read line < /var/run/${base}.pid
|
||||||
|
for p in $line ; do
|
||||||
|
[ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -n "${pid:-}" -a -z "${force:-}" ] && return
|
||||||
|
|
||||||
|
# make sure it doesn't core dump anywhere; while this could mask
|
||||||
|
# problems with the daemon, it also closes some security problems
|
||||||
|
ulimit -S -c 0 >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Echo daemon
|
||||||
|
[ "${BOOTUP:-}" = "verbose" -a -z "$LSB" ] && echo -n " $base"
|
||||||
|
|
||||||
|
# And start it up.
|
||||||
|
if [ -z "$user" ]; then
|
||||||
|
$nice initlog $INITLOG_ARGS -c "$*"
|
||||||
|
else
|
||||||
|
$nice initlog $INITLOG_ARGS -c "su -s /bin/bash - $user -c \"$*\""
|
||||||
|
fi
|
||||||
|
[ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup"
|
||||||
|
}
|
||||||
|
|
||||||
|
# A function to stop a program.
|
||||||
|
killproc() {
|
||||||
|
RC=0
|
||||||
|
# Test syntax.
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
echo $"Usage: killproc {program} [signal]"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
notset=0
|
||||||
|
# check for second arg to be kill level
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
killlevel=$2
|
||||||
|
else
|
||||||
|
notset=1
|
||||||
|
killlevel="-9"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Save basename.
|
||||||
|
base=${1##*/}
|
||||||
|
|
||||||
|
# Find pid.
|
||||||
|
pid=
|
||||||
|
if [ -f /var/run/${base}.pid ]; then
|
||||||
|
local line p
|
||||||
|
read line < /var/run/${base}.pid
|
||||||
|
for p in $line ; do
|
||||||
|
[ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -z "$pid" ]; then
|
||||||
|
pid=`pidof -o $$ -o $PPID -o %PPID -x $1 || \
|
||||||
|
pidof -o $$ -o $PPID -o %PPID -x $base`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Kill it.
|
||||||
|
if [ -n "${pid:-}" ] ; then
|
||||||
|
[ "$BOOTUP" = "verbose" -a -z "$LSB" ] && echo -n "$base "
|
||||||
|
if [ "$notset" -eq "1" ] ; then
|
||||||
|
if checkpid $pid 2>&1; then
|
||||||
|
# TERM first, then KILL if not dead
|
||||||
|
kill -TERM $pid
|
||||||
|
usleep 100000
|
||||||
|
if checkpid $pid && sleep 1 &&
|
||||||
|
checkpid $pid && sleep 3 &&
|
||||||
|
checkpid $pid ; then
|
||||||
|
kill -KILL $pid
|
||||||
|
usleep 100000
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
checkpid $pid
|
||||||
|
RC=$?
|
||||||
|
[ "$RC" -eq 0 ] && failure $"$base shutdown" || success $"$base shutdown"
|
||||||
|
RC=$((! $RC))
|
||||||
|
# use specified level only
|
||||||
|
else
|
||||||
|
if checkpid $pid; then
|
||||||
|
kill $killlevel $pid
|
||||||
|
RC=$?
|
||||||
|
[ "$RC" -eq 0 ] && success $"$base $killlevel" || failure $"$base $killlevel"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
failure $"$base shutdown"
|
||||||
|
RC=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove pid file if any.
|
||||||
|
if [ "$notset" = "1" ]; then
|
||||||
|
rm -f /var/run/$base.pid
|
||||||
|
fi
|
||||||
|
return $RC
|
||||||
|
}
|
||||||
|
|
||||||
|
# A function to find the pid of a program. Looks *only* at the pidfile
|
||||||
|
pidfileofproc() {
|
||||||
|
local base=${1##*/}
|
||||||
|
|
||||||
|
# Test syntax.
|
||||||
|
if [ "$#" = 0 ] ; then
|
||||||
|
echo $"Usage: pidfileofproc {program}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# First try "/var/run/*.pid" files
|
||||||
|
if [ -f /var/run/$base.pid ] ; then
|
||||||
|
local line p pid=
|
||||||
|
read line < /var/run/$base.pid
|
||||||
|
for p in $line ; do
|
||||||
|
[ -z "${p//[0-9]/}" -a -d /proc/$p ] && pid="$pid $p"
|
||||||
|
done
|
||||||
|
if [ -n "$pid" ]; then
|
||||||
|
echo $pid
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# A function to find the pid of a program.
|
||||||
|
pidofproc() {
|
||||||
|
base=${1##*/}
|
||||||
|
|
||||||
|
# Test syntax.
|
||||||
|
if [ "$#" = 0 ]; then
|
||||||
|
echo $"Usage: pidofproc {program}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# First try "/var/run/*.pid" files
|
||||||
|
if [ -f /var/run/$base.pid ]; then
|
||||||
|
local line p pid=
|
||||||
|
read line < /var/run/$base.pid
|
||||||
|
for p in $line ; do
|
||||||
|
[ -z "${p//[0-9]/}" -a -d /proc/$p ] && pid="$pid $p"
|
||||||
|
done
|
||||||
|
if [ -n "$pid" ]; then
|
||||||
|
echo $pid
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
pidof -o $$ -o $PPID -o %PPID -x $1 || \
|
||||||
|
pidof -o $$ -o $PPID -o %PPID -x $base
|
||||||
|
}
|
||||||
|
|
||||||
|
status() {
|
||||||
|
local base=${1##*/}
|
||||||
|
local pid
|
||||||
|
|
||||||
|
# Test syntax.
|
||||||
|
if [ "$#" = 0 ] ; then
|
||||||
|
echo $"Usage: status {program}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# First try "pidof"
|
||||||
|
pid=`pidof -o $$ -o $PPID -o %PPID -x $1 || \
|
||||||
|
pidof -o $$ -o $PPID -o %PPID -x ${base}`
|
||||||
|
if [ -n "$pid" ]; then
|
||||||
|
echo $"${base} (pid $pid) is running..."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Next try "/var/run/*.pid" files
|
||||||
|
if [ -f /var/run/${base}.pid ] ; then
|
||||||
|
read pid < /var/run/${base}.pid
|
||||||
|
if [ -n "$pid" ]; then
|
||||||
|
echo $"${base} dead but pid file exists"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# See if /var/lock/subsys/${base} exists
|
||||||
|
if [ -f /var/lock/subsys/${base} ]; then
|
||||||
|
echo $"${base} dead but subsys locked"
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
echo $"${base} is stopped"
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
|
||||||
|
echo_success() {
|
||||||
|
[ "$BOOTUP" = "color" ] && $MOVE_TO_COL
|
||||||
|
echo -n "[ "
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
|
||||||
|
echo -n $"OK"
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
|
||||||
|
echo -n " ]"
|
||||||
|
echo -ne "\r"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
echo_failure() {
|
||||||
|
[ "$BOOTUP" = "color" ] && $MOVE_TO_COL
|
||||||
|
echo -n "["
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
|
||||||
|
echo -n $"FAILED"
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
|
||||||
|
echo -n "]"
|
||||||
|
echo -ne "\r"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
echo_passed() {
|
||||||
|
[ "$BOOTUP" = "color" ] && $MOVE_TO_COL
|
||||||
|
echo -n "["
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
|
||||||
|
echo -n $"PASSED"
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
|
||||||
|
echo -n "]"
|
||||||
|
echo -ne "\r"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
echo_warning() {
|
||||||
|
[ "$BOOTUP" = "color" ] && $MOVE_TO_COL
|
||||||
|
echo -n "["
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
|
||||||
|
echo -n $"WARNING"
|
||||||
|
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
|
||||||
|
echo -n "]"
|
||||||
|
echo -ne "\r"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Log that something succeeded
|
||||||
|
success() {
|
||||||
|
if [ -z "${IN_INITLOG:-}" ]; then
|
||||||
|
initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
|
||||||
|
else
|
||||||
|
# silly hack to avoid EPIPE killing rc.sysinit
|
||||||
|
trap "" SIGPIPE
|
||||||
|
echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
|
||||||
|
trap - SIGPIPE
|
||||||
|
fi
|
||||||
|
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_success
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Log that something failed
|
||||||
|
failure() {
|
||||||
|
rc=$?
|
||||||
|
if [ -z "${IN_INITLOG:-}" ]; then
|
||||||
|
initlog $INITLOG_ARGS -n $0 -s "$1" -e 2
|
||||||
|
else
|
||||||
|
trap "" SIGPIPE
|
||||||
|
echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 2" >&21
|
||||||
|
trap - SIGPIPE
|
||||||
|
fi
|
||||||
|
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_failure
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
# Log that something passed, but may have had errors. Useful for fsck
|
||||||
|
passed() {
|
||||||
|
rc=$?
|
||||||
|
if [ -z "${IN_INITLOG:-}" ]; then
|
||||||
|
initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
|
||||||
|
else
|
||||||
|
trap "" SIGPIPE
|
||||||
|
echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
|
||||||
|
trap - SIGPIPE
|
||||||
|
fi
|
||||||
|
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_passed
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
# Log a warning
|
||||||
|
warning() {
|
||||||
|
rc=$?
|
||||||
|
if [ -z "${IN_INITLOG:-}" ]; then
|
||||||
|
initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
|
||||||
|
else
|
||||||
|
trap "" SIGPIPE
|
||||||
|
echo "$INITLOG_ARGS -n $0 -s \"$1\" -e 1" >&21
|
||||||
|
trap - SIGPIPE
|
||||||
|
fi
|
||||||
|
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_warning
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run some action. Log its output.
|
||||||
|
action() {
|
||||||
|
STRING=$1
|
||||||
|
echo -n "$STRING "
|
||||||
|
shift
|
||||||
|
initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING"
|
||||||
|
rc=$?
|
||||||
|
echo
|
||||||
|
return $rc
|
||||||
|
}
|
||||||
|
|
||||||
|
# returns OK if $1 contains $2
|
||||||
|
strstr() {
|
||||||
|
#case "$1" in
|
||||||
|
# *${2}*) return 0 ;;
|
||||||
|
#esac
|
||||||
|
#return 1
|
||||||
|
[ "$1" = "$2" ] && return 0
|
||||||
|
slice=${1#*$2*}
|
||||||
|
[ "$slice" = "$1" ] && return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Confirm whether we really want to run this service
|
||||||
|
confirm() {
|
||||||
|
local YES=$"yY"
|
||||||
|
local NO=$"nN"
|
||||||
|
local CONT=$"cC"
|
||||||
|
|
||||||
|
while : ; do
|
||||||
|
echo -n $"Start service $1 (Y)es/(N)o/(C)ontinue? [Y] "
|
||||||
|
read answer
|
||||||
|
if strstr "$YES" "$answer" || [ "$answer" = "" ] ; then
|
||||||
|
return 0
|
||||||
|
elif strstr "$CONT" "$answer" ; then
|
||||||
|
return 2
|
||||||
|
elif strstr "$NO" "$answer" ; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
22
app-admin/hpasm/files/hpasm
Normal file
22
app-admin/hpasm/files/hpasm
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/sbin/runscript
|
||||||
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
|
||||||
|
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||||
|
|
||||||
|
#NB: Config is in /etc/conf.d/bonding
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
need net snmpd
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting HPASM"
|
||||||
|
/opt/compaq/hpasm/etc/hpasm start
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping HPASM"
|
||||||
|
/opt/compaq/hpasm/etc/hpasm stop
|
||||||
|
eend $?
|
||||||
|
}
|
||||||
|
|
33
app-admin/hpasm/files/hppasswd
Normal file
33
app-admin/hpasm/files/hppasswd
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
change)
|
||||||
|
|
||||||
|
/opt/compaq/foundation/etc/hpwebsetup -v
|
||||||
|
|
||||||
|
echo; echo "Configuring Passwords"; echo
|
||||||
|
|
||||||
|
echo "Please Enter an Operator password"
|
||||||
|
read -s PASSWD
|
||||||
|
/opt/compaq/foundation/etc/hpwebsetup -pO:$PASSWD -f
|
||||||
|
|
||||||
|
echo "Please Enter an Administrator password"
|
||||||
|
read -s PASSWD
|
||||||
|
/opt/compaq/foundation/etc/hpwebsetup -pA:$PASSWD -f
|
||||||
|
|
||||||
|
echo "Please Enter an User password"
|
||||||
|
read -s PASSWD
|
||||||
|
/opt/compaq/foundation/etc/hpwebsetup -pU:$PASSWD -f
|
||||||
|
;;
|
||||||
|
|
||||||
|
disable)
|
||||||
|
rm -rf /var/spool/compaq/wbem/CPQHMMD.ACL
|
||||||
|
echo "Passwords disabled. Run \"hppasswd change\" to reenable."
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {change|disable}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
exit 0
|
BIN
app-admin/hpasm/files/initlog
Normal file
BIN
app-admin/hpasm/files/initlog
Normal file
Binary file not shown.
23
app-admin/hpasm/files/initlog.conf
Normal file
23
app-admin/hpasm/files/initlog.conf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# /etc/initlog.conf
|
||||||
|
#
|
||||||
|
# initlog configuration file
|
||||||
|
#
|
||||||
|
# lines preceded by a '#' are comments
|
||||||
|
#
|
||||||
|
# anything not recognized is ignored. :)
|
||||||
|
|
||||||
|
# This sets the default logging facility. (can override with command line arguments)
|
||||||
|
facility local7
|
||||||
|
|
||||||
|
# This sets the default logging priority. (can override with command line arguments)
|
||||||
|
priority notice
|
||||||
|
|
||||||
|
# ignore foo
|
||||||
|
# means to discard any output lines that match the regular expression foo
|
||||||
|
|
||||||
|
# This regexp is useful if you use fsck's -C option.
|
||||||
|
ignore [^:]+: \|[=]+
|
||||||
|
# This regexp is useful for fsck's feature of setting file types
|
||||||
|
ignore [^:]+: Setting filetype
|
||||||
|
# This regexp is useful for quotacheck
|
||||||
|
ignore ^[-\\\|\/]$
|
407
app-admin/hpasm/files/snmpd.conf
Normal file
407
app-admin/hpasm/files/snmpd.conf
Normal file
@ -0,0 +1,407 @@
|
|||||||
|
# Following entries were added by HP Insight Management Agents at
|
||||||
|
# Thu Aug 7 15:18:06 EDT 2003
|
||||||
|
rwcommunity public 127.0.0.1
|
||||||
|
rocommunity public 127.0.0.1
|
||||||
|
#rwcommunity public 172.27.228.73
|
||||||
|
rocommunity public
|
||||||
|
#trapcommunity public
|
||||||
|
#trapsink 172.27.228.73 public
|
||||||
|
syscontact Admin admin@yourdomain.com
|
||||||
|
syslocation 28th floor server room
|
||||||
|
#dlmod cmaX /usr/lib/libcmaX.so
|
||||||
|
# ---------------------- END --------------------
|
||||||
|
# Following entries were added by HP Insight Management Agents at
|
||||||
|
# Mon Sep 23 02:48:11 EDT 2002
|
||||||
|
# ---------------------- END --------------------
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# snmpd.conf:
|
||||||
|
# An example configuration file for configuring the ucd-snmp snmpd agent.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# This file is intended to only be as a starting point. Many more
|
||||||
|
# configuration directives exist than are mentioned in this file. For
|
||||||
|
# full details, see the snmpd.conf(5) manual page.
|
||||||
|
#
|
||||||
|
# All lines beginning with a '#' are comments and are intended for you
|
||||||
|
# to read. All other lines are configuration commands for the agent.
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Access Control
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# As shipped, the snmpd demon will only respond to queries on the
|
||||||
|
# system mib group until this file is replaced or modified for
|
||||||
|
# security purposes. Examples are shown below about how to increase the
|
||||||
|
# level of access.
|
||||||
|
|
||||||
|
# By far, the most common question I get about the agent is "why won't
|
||||||
|
# it work?", when really it should be "how do I configure the agent to
|
||||||
|
# allow me to access it?"
|
||||||
|
#
|
||||||
|
# By default, the agent responds to the "public" community for read
|
||||||
|
# only access, if run out of the box without any configuration file in
|
||||||
|
# place. The following examples show you other ways of configuring
|
||||||
|
# the agent so that you can change the community names, and give
|
||||||
|
# yourself write access to the mib tree as well.
|
||||||
|
#
|
||||||
|
# For more information, read the FAQ as well as the snmpd.conf(5)
|
||||||
|
# manual page.
|
||||||
|
|
||||||
|
####
|
||||||
|
# First, map the community name "public" into a "security name"
|
||||||
|
|
||||||
|
# sec.name source community
|
||||||
|
com2sec notConfigUser default public
|
||||||
|
|
||||||
|
####
|
||||||
|
# Second, map the security name into a group name:
|
||||||
|
|
||||||
|
# groupName securityModel securityName
|
||||||
|
group notConfigGroup v1 notConfigUser
|
||||||
|
group notConfigGroup v2c notConfigUser
|
||||||
|
|
||||||
|
####
|
||||||
|
# Third, create a view for us to let the group have rights to:
|
||||||
|
|
||||||
|
# name incl/excl subtree mask(optional)
|
||||||
|
view systemview included system
|
||||||
|
|
||||||
|
####
|
||||||
|
# Finally, grant the group read-only access to the systemview view.
|
||||||
|
|
||||||
|
# group context sec.model sec.level prefix read write notif
|
||||||
|
access notConfigGroup "" any noauth exact systemview none none
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Here is a commented out example configuration that allows less
|
||||||
|
# restrictive access.
|
||||||
|
|
||||||
|
# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
|
||||||
|
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
|
||||||
|
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
|
||||||
|
|
||||||
|
## sec.name source community
|
||||||
|
#com2sec local localhost COMMUNITY
|
||||||
|
#com2sec mynetwork NETWORK/24 COMMUNITY
|
||||||
|
|
||||||
|
## group.name sec.model sec.name
|
||||||
|
#group MyRWGroup any local
|
||||||
|
#group MyROGroup any mynetwork
|
||||||
|
#
|
||||||
|
#group MyRWGroup any otherv3user
|
||||||
|
#...
|
||||||
|
|
||||||
|
## incl/excl subtree mask
|
||||||
|
#view all included .1 80
|
||||||
|
|
||||||
|
## -or just the mib2 tree-
|
||||||
|
|
||||||
|
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
|
||||||
|
|
||||||
|
|
||||||
|
## context sec.model sec.level prefix read write notif
|
||||||
|
#access MyROGroup "" any noauth 0 all none none
|
||||||
|
#access MyRWGroup "" any noauth 0 all all all
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# System contact information
|
||||||
|
#
|
||||||
|
|
||||||
|
# It is also possible to set the sysContact and sysLocation system
|
||||||
|
# variables through the snmpd.conf file:
|
||||||
|
|
||||||
|
|
||||||
|
# Example output of snmpwalk:
|
||||||
|
# % snmpwalk -v 1 localhost public system
|
||||||
|
# system.sysDescr.0 = "SunOS name sun4c"
|
||||||
|
# system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
|
||||||
|
# system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
|
||||||
|
# system.sysContact.0 = "Me <me@somewhere.org>"
|
||||||
|
# system.sysName.0 = "name"
|
||||||
|
# system.sysLocation.0 = "Right here, right now."
|
||||||
|
# system.sysServices.0 = 72
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Process checks.
|
||||||
|
#
|
||||||
|
# The following are examples of how to use the agent to check for
|
||||||
|
# processes running on the host. The syntax looks something like:
|
||||||
|
#
|
||||||
|
# proc NAME [MAX=0] [MIN=0]
|
||||||
|
#
|
||||||
|
# NAME: the name of the process to check for. It must match
|
||||||
|
# exactly (ie, http will not find httpd processes).
|
||||||
|
# MAX: the maximum number allowed to be running. Defaults to 0.
|
||||||
|
# MIN: the minimum number to be running. Defaults to 0.
|
||||||
|
|
||||||
|
#
|
||||||
|
# Examples (commented out by default):
|
||||||
|
#
|
||||||
|
|
||||||
|
# Make sure mountd is running
|
||||||
|
#proc mountd
|
||||||
|
|
||||||
|
# Make sure there are no more than 4 ntalkds running, but 0 is ok too.
|
||||||
|
#proc ntalkd 4
|
||||||
|
|
||||||
|
# Make sure at least one sendmail, but less than or equal to 10 are running.
|
||||||
|
#proc sendmail 10 1
|
||||||
|
|
||||||
|
# A snmpwalk of the process mib tree would look something like this:
|
||||||
|
#
|
||||||
|
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.2
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
|
||||||
|
# enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
|
||||||
|
#
|
||||||
|
# Note that the errorFlag for mountd is set to 1 because one is not
|
||||||
|
# running (in this case an rpc.mountd is, but thats not good enough),
|
||||||
|
# and the ErrMessage tells you what's wrong. The configuration
|
||||||
|
# imposed in the snmpd.conf file is also shown.
|
||||||
|
#
|
||||||
|
# Special Case: When the min and max numbers are both 0, it assumes
|
||||||
|
# you want a max of infinity and a min of 1.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Executables/scripts
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# You can also have programs run by the agent that return a single
|
||||||
|
# line of output and an exit code. Here are two examples.
|
||||||
|
#
|
||||||
|
# exec NAME PROGRAM [ARGS ...]
|
||||||
|
#
|
||||||
|
# NAME: A generic name.
|
||||||
|
# PROGRAM: The program to run. Include the path!
|
||||||
|
# ARGS: optional arguments to be passed to the program
|
||||||
|
|
||||||
|
# a simple hello world
|
||||||
|
|
||||||
|
#exec echotest /bin/echo hello world
|
||||||
|
|
||||||
|
# Run a shell script containing:
|
||||||
|
#
|
||||||
|
# #!/bin/sh
|
||||||
|
# echo hello world
|
||||||
|
# echo hi there
|
||||||
|
# exit 35
|
||||||
|
#
|
||||||
|
# Note: this has been specifically commented out to prevent
|
||||||
|
# accidental security holes due to someone else on your system writing
|
||||||
|
# a /tmp/shtest before you do. Uncomment to use it.
|
||||||
|
#
|
||||||
|
#exec shelltest /bin/sh /tmp/shtest
|
||||||
|
|
||||||
|
# Then,
|
||||||
|
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.8
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world"
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest"
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
|
||||||
|
# enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0
|
||||||
|
|
||||||
|
# Note that the second line of the /tmp/shtest shell script is cut
|
||||||
|
# off. Also note that the exit status of 35 was returned.
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# disk checks
|
||||||
|
#
|
||||||
|
|
||||||
|
# The agent can check the amount of available disk space, and make
|
||||||
|
# sure it is above a set limit.
|
||||||
|
|
||||||
|
# disk PATH [MIN=100000]
|
||||||
|
#
|
||||||
|
# PATH: mount path to the disk in question.
|
||||||
|
# MIN: Disks with space below this value will have the Mib's errorFlag set.
|
||||||
|
# Default value = 100000.
|
||||||
|
|
||||||
|
# Check the / partition and make sure it contains at least 10 megs.
|
||||||
|
|
||||||
|
#disk / 10000
|
||||||
|
|
||||||
|
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.9
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
|
||||||
|
# enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# load average checks
|
||||||
|
#
|
||||||
|
|
||||||
|
# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
|
||||||
|
#
|
||||||
|
# 1MAX: If the 1 minute load average is above this limit at query
|
||||||
|
# time, the errorFlag will be set.
|
||||||
|
# 5MAX: Similar, but for 5 min average.
|
||||||
|
# 15MAX: Similar, but for 15 min average.
|
||||||
|
|
||||||
|
# Check for loads:
|
||||||
|
#load 12 14 14
|
||||||
|
|
||||||
|
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.10
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
|
||||||
|
# enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Extensible sections.
|
||||||
|
#
|
||||||
|
|
||||||
|
# This alleviates the multiple line output problem found in the
|
||||||
|
# previous executable mib by placing each mib in its own mib table:
|
||||||
|
|
||||||
|
# Run a shell script containing:
|
||||||
|
#
|
||||||
|
# #!/bin/sh
|
||||||
|
# echo hello world
|
||||||
|
# echo hi there
|
||||||
|
# exit 35
|
||||||
|
#
|
||||||
|
# Note: this has been specifically commented out to prevent
|
||||||
|
# accidental security holes due to someone else on your system writing
|
||||||
|
# a /tmp/shtest before you do. Uncomment to use it.
|
||||||
|
#
|
||||||
|
# exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest
|
||||||
|
|
||||||
|
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.50
|
||||||
|
# enterprises.ucdavis.50.1.1 = 1
|
||||||
|
# enterprises.ucdavis.50.2.1 = "shelltest"
|
||||||
|
# enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
|
||||||
|
# enterprises.ucdavis.50.100.1 = 35
|
||||||
|
# enterprises.ucdavis.50.101.1 = "hello world."
|
||||||
|
# enterprises.ucdavis.50.101.2 = "hi there."
|
||||||
|
# enterprises.ucdavis.50.102.1 = 0
|
||||||
|
|
||||||
|
# Now the Output has grown to two lines, and we can see the 'hi
|
||||||
|
# there.' output as the second line from our shell script.
|
||||||
|
#
|
||||||
|
# Note that you must alter the mib.txt file to be correct if you want
|
||||||
|
# the .50.* outputs above to change to reasonable text descriptions.
|
||||||
|
|
||||||
|
# Other ideas:
|
||||||
|
#
|
||||||
|
# exec .1.3.6.1.4.1.2021.51 ps /bin/ps
|
||||||
|
# exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
|
||||||
|
# exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Pass through control.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# pass MIBOID EXEC-COMMAND
|
||||||
|
#
|
||||||
|
# This will pass total control of the mib underneath the MIBOID
|
||||||
|
# portion of the mib to the EXEC-COMMAND.
|
||||||
|
#
|
||||||
|
# Note: You'll have to change the path of the passtest script to your
|
||||||
|
# source directory or install it in the given location.
|
||||||
|
#
|
||||||
|
# Example: (see the script for details)
|
||||||
|
# (commented out here since it requires that you place the
|
||||||
|
# script in the right location. (its not installed by default))
|
||||||
|
|
||||||
|
# pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/local/passtest
|
||||||
|
|
||||||
|
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.255
|
||||||
|
# enterprises.ucdavis.255.1 = "life the universe and everything"
|
||||||
|
# enterprises.ucdavis.255.2.1 = 42
|
||||||
|
# enterprises.ucdavis.255.2.2 = OID: 42.42.42
|
||||||
|
# enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
|
||||||
|
# enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
|
||||||
|
# enterprises.ucdavis.255.5 = 42
|
||||||
|
# enterprises.ucdavis.255.6 = Gauge: 42
|
||||||
|
#
|
||||||
|
# % snmpget -v 1 localhost public .1.3.6.1.4.1.2021.255.5
|
||||||
|
# enterprises.ucdavis.255.5 = 42
|
||||||
|
#
|
||||||
|
# % snmpset -v 1 localhost public .1.3.6.1.4.1.2021.255.1 s "New string"
|
||||||
|
# enterprises.ucdavis.255.1 = "New string"
|
||||||
|
#
|
||||||
|
|
||||||
|
# For specific usage information, see the man/snmpd.conf.5 manual page
|
||||||
|
# as well as the local/passtest script used in the above example.
|
||||||
|
|
||||||
|
# Added for support of bcm5820 cards.
|
||||||
|
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# Further Information
|
||||||
|
#
|
||||||
|
# See the snmpd.conf manual page, and the output of "snmpd -H".
|
228
app-admin/hpasm/hpasm-7.7.0.115.ebuild
Normal file
228
app-admin/hpasm/hpasm-7.7.0.115.ebuild
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
# Copyright 1999-2009 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: $
|
||||||
|
|
||||||
|
|
||||||
|
inherit eutils rpm versionator
|
||||||
|
|
||||||
|
MY_PV=$(replace_version_separator 3 '-')
|
||||||
|
HP_FILE32="hpasm-${MY_PV}.sles10.i586.rpm"
|
||||||
|
HP_FILE64="hpasm-${MY_PV}.sles10.x86_64.rpm"
|
||||||
|
|
||||||
|
DESCRIPTION="hp Server Management Drivers and Agents"
|
||||||
|
HOMEPAGE="http://h18000.www1.hp.com/products/servers/linux/documentation.html"
|
||||||
|
SRC_URI="x86? ( ftp://ftp.compaq.com/pub/products/servers/supportsoftware/linux/${HP_FILE32} )
|
||||||
|
amd64? ( ftp://ftp.compaq.com/pub/products/servers/supportsoftware/linux/${HP_FILE64} )"
|
||||||
|
|
||||||
|
LICENSE="hp-value"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~x86 ~amd64"
|
||||||
|
IUSE=""
|
||||||
|
RESTRICT="mirror"
|
||||||
|
|
||||||
|
DEPEND="${RDEPEND}
|
||||||
|
virtual/linux-sources
|
||||||
|
mail-client/mailx
|
||||||
|
sys-apps/pciutils
|
||||||
|
sys-libs/ncurses
|
||||||
|
net-analyzer/net-snmp
|
||||||
|
!app-admin/cmastor"
|
||||||
|
##X? ( tix virtual/x11 tclx )"
|
||||||
|
|
||||||
|
S="${WORKDIR}"
|
||||||
|
|
||||||
|
src_unpack() {
|
||||||
|
if use x86
|
||||||
|
then
|
||||||
|
hparch=i586
|
||||||
|
hplib=lib
|
||||||
|
rpm_unpack "${DISTDIR}"/${HP_FILE32}
|
||||||
|
elif use amd64
|
||||||
|
then
|
||||||
|
hparch=x86_64
|
||||||
|
hplib=lib64
|
||||||
|
rpm_unpack "${DISTDIR}"/${HP_FILE64}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
# into /opt/novell/ncl
|
||||||
|
# dobin "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/ncl/bin/novfsd
|
||||||
|
# newbin "${WORKDIR}"/${PN}-${MY_PV}/opt/novell/ncl/bin/Debug/novfsd novfsd-Debug
|
||||||
|
# dodoc "${WORKDIR}"/${PN}-${MY_PV}/usr/share/doc/packages/${PN}/*
|
||||||
|
# exeinto /etc/opt/novell/xtier/xregd/init/
|
||||||
|
# doexe "${FILESDIR}"/*.sh
|
||||||
|
|
||||||
|
# newinitd "${FILESDIR}"/novfsd20.initd novfsd
|
||||||
|
# keepdir /var/opt/novell/run
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HPASM_HOME="/opt/compaq"
|
||||||
|
HPASMHP_HOME="/opt/hp"
|
||||||
|
|
||||||
|
dodir ${HPASM_HOME}
|
||||||
|
dodir ${HPASMHP_HOME}
|
||||||
|
|
||||||
|
cp -Rdp \
|
||||||
|
opt/compaq/* \
|
||||||
|
${D}${HPASM_HOME}
|
||||||
|
|
||||||
|
cp -Rdp \
|
||||||
|
opt/hp/* \
|
||||||
|
${D}${HPASMHP_HOME}
|
||||||
|
|
||||||
|
dodir /etc
|
||||||
|
cp ${FILESDIR}/initlog.conf ${D}/etc
|
||||||
|
|
||||||
|
exeinto /opt/compaq/hpasm/etc
|
||||||
|
doexe ${FILESDIR}/functions || die
|
||||||
|
|
||||||
|
into /
|
||||||
|
|
||||||
|
cp ${FILESDIR}/initlog .
|
||||||
|
dosbin initlog
|
||||||
|
|
||||||
|
dosym /opt/compaq/hpasm/addon/libcpqci.so.1.0 /opt/compaq/hpasm/addon/libcpqci.so.1
|
||||||
|
dosym /opt/compaq/hpasm/addon/libcpqci.so.1.0 /opt/compaq/hpasm/addon/libcpqci.so
|
||||||
|
|
||||||
|
dodir /usr/share/pixmaps
|
||||||
|
dosym /opt/compaq/utils/hplogo.xbm /usr/share/pixmaps/hplogo.xbm
|
||||||
|
dosym /opt/compaq/utils/m_blue.gif /usr/share/pixmaps/m_blue.gif
|
||||||
|
dosym /opt/compaq/utils/m_fail.gif /usr/share/pixmaps/m_fail.gif
|
||||||
|
dosym /opt/compaq/utils/m_green.gif /usr/share/pixmaps/m_green.gif
|
||||||
|
dosym /opt/compaq/utils/m_red.gif /usr/share/pixmaps/m_red.gif
|
||||||
|
dosym /opt/compaq/utils/m_yellow.gif /usr/share/pixmaps/m_yellow.gif
|
||||||
|
|
||||||
|
dosym /opt/compaq/utils/cpqimlview /sbin/cpqimlview
|
||||||
|
dosym /opt/compaq/utils/hpimlview /sbin/hpimlview
|
||||||
|
dosym /opt/compaq/utils/cpqimlview.tcl /sbin/cpqimlview.tcl
|
||||||
|
dosym /opt/compaq/utils/hplog /sbin/hplog
|
||||||
|
dosym /opt/compaq/utils/hpuid /sbin/hpuid
|
||||||
|
dosym /opt/compaq/utils/imlbe /sbin/imlbe
|
||||||
|
dosym /opt/compaq/utils/hpasmcli /sbin/hpasmcli
|
||||||
|
dosym /opt/compaq/utils/bootcfg /sbin/bootcfg
|
||||||
|
|
||||||
|
dodir /usr/lib
|
||||||
|
|
||||||
|
if [ ! -f ${ROOT}/usr/share/snmp/snmpd.conf ]
|
||||||
|
then
|
||||||
|
insinto /usr/share/snmp
|
||||||
|
doins ${FILESDIR}/snmpd.conf || die
|
||||||
|
else
|
||||||
|
insinto /usr/share/snmp
|
||||||
|
newins ${FILESDIR}/snmpd.conf snmpd.conf.cma || die
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /usr/lib/libcrypto.so.2 ]
|
||||||
|
then
|
||||||
|
dosym /usr/lib/libcrypto.so.0.9.6 /usr/lib/libcrypto.so.2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /usr/lib/libssl.so.2 ]
|
||||||
|
then
|
||||||
|
dosym /usr/lib/libssl.so.0.9.6 /usr/lib/libssl.so.2
|
||||||
|
fi
|
||||||
|
|
||||||
|
dodir /var/spool/compaq
|
||||||
|
|
||||||
|
exeinto /etc/init.d
|
||||||
|
doexe ${FILESDIR}/hpasm || die
|
||||||
|
|
||||||
|
|
||||||
|
doman usr/share/man/man4/hpasm.4.gz \
|
||||||
|
usr/share/man/man8/cpqimlview.8.gz usr/share/man/man8/hplog.8.gz \
|
||||||
|
usr/share/man/man8/hpuid.8.gz
|
||||||
|
|
||||||
|
|
||||||
|
for i in opt/compaq/hpasm/addon/cmad.sh \
|
||||||
|
opt/compaq/hpasm/etc/functions \
|
||||||
|
|
||||||
|
|
||||||
|
do
|
||||||
|
cat ${D}/$i | \
|
||||||
|
sed 's/VENDOR="Unknown"/VENDOR="RedHat"/' >\
|
||||||
|
${D}/$i-new
|
||||||
|
mv ${D}/$i-new ${D}/$i
|
||||||
|
|
||||||
|
cat ${D}/$i | \
|
||||||
|
sed 's/^\.\ \/etc\/init.d\/functions/\.\ \/opt\/compaq\/hpasm\/etc\/functions/' >\
|
||||||
|
${D}/$i-new
|
||||||
|
mv ${D}/$i-new ${D}/$i
|
||||||
|
|
||||||
|
cat ${D}/$i | \
|
||||||
|
sed 's/^\.\ \/etc\/rc.d\/init.d\/functions/\.\ \/opt\/compaq\/hpasm\/etc\/functions/' >\
|
||||||
|
${D}/$i-new
|
||||||
|
mv ${D}/$i-new ${D}/$i
|
||||||
|
|
||||||
|
cat ${D}/$i | \
|
||||||
|
sed 's/usleep 250000/sleep 0\.25/'>\
|
||||||
|
${D}/$i-new
|
||||||
|
mv ${D}/$i-new ${D}/$i
|
||||||
|
|
||||||
|
|
||||||
|
cat ${D}/$i | \
|
||||||
|
sed 's/usleep 100000/sleep 0\.1/'>\
|
||||||
|
${D}/$i-new
|
||||||
|
mv ${D}/$i-new ${D}/$i
|
||||||
|
|
||||||
|
chmod 755 ${D}/$i
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
echo "exclude cmhp" >> ${D}/opt/compaq/cma.conf
|
||||||
|
echo "trapemail /bin/mail -s 'HP Insight Management Agents Trap Alarm' root" >> ${D}/opt/compaq/cma.conf
|
||||||
|
|
||||||
|
echo "Gentoo:2.x:2005" >> ${D}/opt/compaq/hpasm/distro.txt
|
||||||
|
## echo "RELEASE=Unknown" >> ${D}/opt/compaq/hpasm/distro.txt
|
||||||
|
## echo "PRODUCT=Unknown" >> ${D}/opt/compaq/hpasm/distro.txt
|
||||||
|
|
||||||
|
## for i in /opt/compaq/foundation/etc/cmafdtnobjects.conf /opt/compaq/server/etc/cmasvrobjects.conf /opt/compaq/storage/etc/cmastorobjects.conf
|
||||||
|
|
||||||
|
## do
|
||||||
|
## echo $i >> ${D}/opt/compaq/cmaobjects.conf
|
||||||
|
## done
|
||||||
|
|
||||||
|
echo "/usr/bin/wish /sbin/cpqimlview.tcl -tclx /usr/lib/libtclx.so -tix /usr/lib/libtix8.2.so" > ${D}/opt/compaq/utils/cpqimlview-new
|
||||||
|
mv ${D}/opt/compaq/utils/cpqimlview-new ${D}/opt/compaq/utils/cpqimlview
|
||||||
|
|
||||||
|
chmod 755 ${D}/opt/compaq/utils/cpqimlview
|
||||||
|
|
||||||
|
cat ${D}/opt/compaq/utils/cpqimlview.tcl | \
|
||||||
|
sed 's/set DriverInfo \[exec rpm -q hpasm\]/\#set DriverInfo \[exec rpm -q hpasm\]/' >\
|
||||||
|
${D}/opt/compaq/utils/cpqimlview.tcl-new
|
||||||
|
mv ${D}/opt/compaq/utils/cpqimlview.tcl-new \
|
||||||
|
${D}/opt/compaq/utils/cpqimlview.tcl
|
||||||
|
|
||||||
|
cat ${D}/opt/compaq/utils/cpqimlview.tcl | \
|
||||||
|
sed 's/wm title $form "$IML_GUI_MSGS(MSG_APP_TITLE) $DriverInfo $newTitle"/wm title $form "$IML_GUI_MSGS(MSG_APP_TITLE) $newTitle"/' >\
|
||||||
|
${D}/opt/compaq/utils/cpqimlview.tcl-new
|
||||||
|
mv ${D}/opt/compaq/utils/cpqimlview.tcl-new \
|
||||||
|
${D}/opt/compaq/utils/cpqimlview.tcl
|
||||||
|
|
||||||
|
cat ${D}/opt/compaq/utils/cpqimlview.tcl | \
|
||||||
|
sed 's/wm title $form "$IML_GUI_MSGS(MSG_APP_TITLE) - $DriverInfo"/wm title $form "$IML_GUI_MSGS(MSG_APP_TITLE) - "/' >\
|
||||||
|
${D}/opt/compaq/utils/cpqimlview.tcl-new
|
||||||
|
mv ${D}/opt/compaq/utils/cpqimlview.tcl-new \
|
||||||
|
${D}/opt/compaq/utils/cpqimlview.tcl
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postinst() {
|
||||||
|
einfo "If you want to run cpqimlview you will"
|
||||||
|
einfo "need to emerge xfree, tclx, and tix."
|
||||||
|
einfo ""
|
||||||
|
einfo "If you want to use the web agent and other features"
|
||||||
|
einfo "then configure your /usr/share/snmp/snmpd.conf,"
|
||||||
|
einfo "emerge net-snmp before starting hpasm."
|
||||||
|
einfo ""
|
||||||
|
einfo "If you didn't already have an snmpd.conf then a"
|
||||||
|
einfo "generic one has been place in /usr/share/snmp/"
|
||||||
|
einfo ""
|
||||||
|
einfo "It is not required to have net-snmp"
|
||||||
|
einfo "running for basic hpasm functionality."
|
||||||
|
einfo ""
|
||||||
|
einfo "You now need to execute /etc/init.d/hpasm start"
|
||||||
|
einfo "in order to use the installed package. The kernel"
|
||||||
|
einfo "modules will automatically build for you."
|
||||||
|
einfo ""
|
||||||
|
}
|
9
app-admin/hpasm/metadata.xml
Normal file
9
app-admin/hpasm/metadata.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||||
|
<pkgmetadata>
|
||||||
|
<herd>no-herd</herd>
|
||||||
|
<maintainer>
|
||||||
|
<email>bug-wranglers@gentoo.org</email>
|
||||||
|
<description>This package lacks a primary herd or maintainer.</description>
|
||||||
|
</maintainer>
|
||||||
|
</pkgmetadata>
|
Loading…
Reference in New Issue
Block a user