From 75dd4cfd2be22775b0f2287ce08bd69dfd3ad939 Mon Sep 17 00:00:00 2001 From: Ondrej Dvoracek Date: Oct 08 2007 10:05:03 +0000 Subject: corrected some bugs --- diff --git a/.cvsignore b/.cvsignore index c961250..966ed5b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -netkit-bootparamd-0.17-pre20000412.tar.gz +netkit-bootparamd-0.17.tar.gz diff --git a/bootparamd.init b/bootparamd.init index 3f6ee24..81fc1d1 100644 --- a/bootparamd.init +++ b/bootparamd.init @@ -7,6 +7,15 @@ # processname: rpc.bootparamd # config: /etc/bootparams +### BEGIN INIT INFO +# Provides: rpc.bootparamd +# Required-Start: $network +# Short-Description: bootparamd daemon +# Description: The bootparamd server allows older Sun workstations to \ +# net boot from Linux boxes. It (along with rarp) is rarely \ +# used anymore; bootp and dhcp have mostly replaced both of them. +### END INIT INFO + # Source function library. . /etc/init.d/functions @@ -17,58 +26,58 @@ prog="bootparamd" RETVAL=0 start() { - # Require /etc/bootparams - [ -f /etc/bootparams ] || exit 6 - - # Check that networking is up. - if [ ${NETWORKING} = "no" ] - then - exit 1 - fi - - echo -n $"Starting $prog: " - daemon rpc.bootparamd - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bootparamd - return $RETVAL -} + # Require /etc/bootparams + [ -f /etc/bootparams ] || exit 6 + + # Check that networking is up. + if [ ${NETWORKING} = "no" ] + then + exit 1 + fi + + echo -n $"Starting $prog: " + daemon rpc.bootparamd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/bootparamd + return $RETVAL +} stop() { - echo -n $"Stopping $prog: " - killproc rpc.bootparamd - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bootparamd - return $RETVAL -} + echo -n $"Stopping $prog: " + killproc rpc.bootparamd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/bootparamd + return $RETVAL +} restart() { - stop - start -} + stop + start +} # See how we were called. case "$1" in start) - start - ;; + start + ;; stop) - stop - ;; + stop + ;; status) - status rpc.bootparamd + status rpc.bootparamd ;; restart|reload) - restart - ;; + restart + ;; condrestart) - [ -f /var/lock/subsys/bootparamd ] && restart || : - ;; + [ -f /var/lock/subsys/bootparamd ] && restart || : + ;; *) - echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" - exit 3 - ;; + echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" + exit 3 + ;; esac exit $? diff --git a/bootparamd.spec b/bootparamd.spec index 17270c1..b00e50e 100644 --- a/bootparamd.spec +++ b/bootparamd.spec @@ -1,12 +1,10 @@ -%define _snapshot -pre20000412 - -Summary: A server process which provides boot information to diskless clients. +Summary: A server process which provides boot information to diskless clients Name: bootparamd Version: 0.17 -Release: 25%{?dist} +Release: 26%{?dist} License: BSD Group: System Environment/Daemons -Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-bootparamd-%{version}%{_snapshot}.tar.gz +Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-%{name}-%{version}.tar.gz Source1: bootparamd.init Patch: bootparamd-manpage-63567.patch Patch1: bootparamd-resolver.patch @@ -15,9 +13,11 @@ Patch3: bootparamd.fast-dns.patch Patch4: bootparamd-resolver-fix.patch Patch5: bootparamd-get-router.patch Patch6: bootparamd-err.patch -Prereq: /sbin/chkconfig /etc/init.d +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service Requires: portmap -BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description The bootparamd process provides bootparamd, a server process which @@ -34,7 +34,7 @@ You should install bootparamd if you need to provide boot information to diskless clients on your network. %prep -%setup -q -n netkit-bootparamd-%{version}%{_snapshot} +%setup -q -n netkit-%{name}-%{version} %patch -p1 %patch1 -p1 %patch2 -p1 -b .unblocksignals @@ -65,10 +65,11 @@ rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_mandir}/man{1,8} mkdir -p %{buildroot}%{_sbindir} -mkdir -p %{buildroot}/etc/rc.d/init.d + +install -d %{buildroot}%{_initrddir} +install -m 755 %SOURCE1 %{buildroot}%{_initrddir}/bootparamd make INSTALLROOT=%{buildroot} install -install -m 755 $RPM_SOURCE_DIR/bootparamd.init %{buildroot}/etc/rc.d/init.d/bootparamd %clean rm -rf %{buildroot} @@ -78,7 +79,8 @@ rm -rf %{buildroot} %preun if [ $1 = 0 ]; then - /sbin/chkconfig --del bootparamd + /sbin/service bootparamd stop >/dev/null 2>&1 + /sbin/chkconfig --del bootparamd fi %files @@ -87,9 +89,13 @@ fi %{_bindir}/callbootd %{_mandir}/man8/rpc.bootparamd.* %{_mandir}/man8/bootparamd.* -%config /etc/rc.d/init.d/bootparamd +%{_initrddir}/bootparamd %changelog +* Mon Oct 08 2007 Ondrej Dvoracek - 0.17-26 +- added LSB header in the initscript +- corrected issues from merge review (#225623) + * Wed May 30 2007 Ondrej Dvoracek - 0.17-25 - corrected init script (#237824) @@ -159,7 +165,7 @@ fi * Wed Apr 4 2001 Jakub Jelinek - don't let configure to guess compiler, it can pick up egcs -* Tue Feb 6 2001 Trond Eivind Glomsr�d +* Tue Feb 6 2001 Trond Eivind Glomsrod - i18nize initscript - exit cleanly if no /etc/bootparams diff --git a/sources b/sources index bfc7263..4da58b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5f40a59369b7990fdc65c1495ca2db5c netkit-bootparamd-0.17-pre20000412.tar.gz +94cbbf5478b0eea8e788c510d80ccb7f netkit-bootparamd-0.17.tar.gz