Skip to contentSkip to conversation

Init Skript / RPM für SuSE & RedHat

DISCUSSION Martin Wilck 3 participants 4 messages Jul 5, 2002 – Jul 8, 2002

lore
Share & tools
lore
#0 lore raw

Das hier ist sicherlich keine endgültige Lösung, aber es zeigt im Prinzip, wie man die Distributions-Unterschiede im init.d Skript bzw. SPEC-file abfangen kann.

Signature · 4 lines
Martin Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:[email protected]
D-33106 Paderborn           http://www.fujitsu-siemens.com/primergy

Summary: SNMP daemon for monitoring the Promise FastTrak RAID controller
Name: ftrksnmp
Version: 1.31.0064
Release: 4fsc
URL: http://www.promise.com
Source0: %{name}-%{version}.tar.gz
License: Commercial
Group: System Environment/Daemons
Vendor: Promise Technology
Packager: Fujitsu Siemens Computers
BuildRoot: %{_tmppath}/%{name}-root

%description
This SNMP agent can be used in connection with an SNMP daemon (ucd-snmp or the Fujitsu Siemens Servermanagement SNMP package) for remote monitoring and control of the operation of the Promise FastTrak (TM) IDE RAID controllers.

It requires the Promise FastTrak (TM) driver version 1.2.0 build 15 to be installed for proper operation.

%prep
%setup -q

%build

%install
rm -rf $RPM_BUILD_ROOT
install -d -m 755 $RPM_BUILD_ROOT/{/etc/rc.d/init.d,/usr/sbin,/usr/share/snmp/mibs,/var/adm/fillup-templates} install -m 644 FASTTRAK-MIB.txt $RPM_BUILD_ROOT/usr/share/snmp/mibs
install -m 755 ftsnmpd $RPM_BUILD_ROOT/usr/sbin
install -m 755 ftstart $RPM_BUILD_ROOT/etc/rc.d/init.d
install -m 644 rc.config.ftsnmpd $RPM_BUILD_ROOT/var/adm/fillup-templates

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%dir /etc/rc.d/init.d
%dir /usr/share/snmp/mibs
%dir /var/adm/fillup-templates
/usr/share/snmp/mibs/FASTTRAK-MIB.txt
/usr/sbin/ftsnmpd
/var/adm/fillup-templates/rc.config.ftsnmpd
%config /etc/rc.d/init.d/ftstart
%doc README

%post
if [ -f /etc/rc.d/init.d/functions ]; then
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add ftstart
elif [ -f /etc/rc.config ]; then
ln -s ../rc.d/init.d/ftstart /etc/init.d/ftstart
[ -x sbin/insserv ] && sbin/insserv /etc/init.d/ftstart
[ -x bin/fillup ] && bin/fillup -q etc/rc.config var/adm/fillup-templates/rc.config.ftsnmpd
fi
exit 0

%preun
/etc/rc.d/init.d/ftstart stop
exit 0

%postun
if [ -f /etc/rc.d/init.d/functions ]; then
[ -x /sbin/chkconfig ] && /sbin/chkconfig --del ftstart
elif [ -f /etc/rc.config ]; then
rm -f /etc/init.d/ftstart
[ -x sbin/insserv ] && sbin/insserv /etc/init.d
fi
exit 0

%changelog
* Fri Jul 5 2002 Martin Wilck <[email protected]>
- Initial build.

#!/bin/sh
#
# chkconfig: 345 95 40
#
# description: SNMP daemon for the FastTrak product line #
# processname: ftsnmpd
# Source function library.

### BEGIN INIT INFO
# Provides:
# Required-Start: snmp
# Required-Stop:
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Description: SNMP daemon for the FastTrak product line
### END INIT INFO

FTSNMPD=/usr/sbin/ftsnmpd

killproc_rh () {
local proc=$1
local sig=$2
killproc $proc $sig
}

killproc_suse () {
local proc=$1
local sig=$2
killproc $sig $proc
}

if [ -f /etc/rc.d/init.d/functions ]; then
# RedHat
. /etc/rc.d/init.d/functions
START=daemon
STOP=killproc_rh
STATUS=status $FTSNMPD
elif [ -f /etc/rc.config ]; then
# SusE

    . /etc/rc.config
    [ "x$START_FTSNMPD" = "xyes" ] || exit 0
    . /etc/rc.status
    START=startproc
    STOP=killproc_suse
    STATUS="rc_status -v"

else
echo "Cannot determine distribution" >&2
exit 1
fi

# See how we were called.
case "$1" in
start)

	echo -n "Starting ftsnmpd: "
	$START $FTSNMPD
	$STATUS
	;;
  stop)
	echo -n "Stopping ftsnmpd: "
	$STOP $FTSNMPD "-15"
	$STATUS
	;;
  status)
	$STATUS
	;;
  restart|reload)
	$0 stop
	$0 start
	;;

*)
exit 1
esac

#1 lore raw

Det hadde vært fint om vi kunne holde lista på engelsk, da de fleste ikke snakker tysk.

or in English

It'd be nice to keep this list in English, as most members don't speak German

roy

Quoted 3 lines · Martin Wilck

Das hier ist sicherlich keine endgültige Lösung, aber es zeigt im Prinzip, wie man die Distributions-Unterschiede im init.d Skript bzw. SPEC-file abfangen kann.

Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester

Computers are like air conditioners.
They stop working when you open Windows.
#2 lore raw
In reply to Martin Wilck

Martin,

Thankyou but nobody really wants a Promise FastTrax loading script in open source. Given the product is closed source.

Cheers,

Quoted 14 lines · Martin Wilck

Das hier ist sicherlich keine endgültige Lösung, aber es zeigt im Prinzip, wie man die Distributions-Unterschiede im init.d Skript bzw. SPEC-file abfangen kann.

Signature · 4 lines
Martin Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:[email protected]
D-33106 Paderborn           http://www.fujitsu-siemens.com/primergy

Andre Hedrick
LAD Storage Consulting Group

#3 lore raw
Quoted 2 lines

Thankyou but nobody really wants a Promise FastTrax loading script in open source. Given the product is closed source.

Wrong mailing list. SORRY :-((
Martin