mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-27 03:39:11 +00:00
Add atftp packaging to xcat-dep
This commit is contained in:
parent
04238b84e4
commit
59ccfdec43
87
atftp/atftp.spec
Normal file
87
atftp/atftp.spec
Normal file
@ -0,0 +1,87 @@
|
||||
Name: atftp
|
||||
Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP server
|
||||
Group: System Environment/Daemons
|
||||
Version: 0.7
|
||||
Release: 1
|
||||
License: GPL
|
||||
Vendor: Linux Networx Inc.
|
||||
Source: atftp_0.7.dfsg.orig.tar.gz
|
||||
Source1: tftpd
|
||||
Patch: atftp_0.7.dfsg-3.diff
|
||||
Buildroot: /var/tmp/atftp-buildroot
|
||||
Packager: Allen Reese <areese@lnxi.com>
|
||||
Provides: tftp-server
|
||||
|
||||
|
||||
%description
|
||||
Multithreaded TFTP server implementing all options (option extension and
|
||||
multicast) as specified in RFC1350, RFC2090, RFC2347, RFC2348 and RFC2349.
|
||||
Atftpd also support multicast protocol knowed as mtftp, defined in the PXE
|
||||
specification. The server supports being started from inetd(8) as well as
|
||||
a deamon using init scripts.
|
||||
|
||||
|
||||
%package client
|
||||
Summary: Advanced Trivial File Transfer Protocol (ATFTP) - TFTP client
|
||||
Group: Applications/Internet
|
||||
|
||||
|
||||
%description client
|
||||
Advanced Trivial File Transfer Protocol client program for requesting
|
||||
files using the TFTP protocol.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -n atftp-0.7.dfsg
|
||||
%patch -p1
|
||||
|
||||
|
||||
%build
|
||||
%configure
|
||||
make
|
||||
|
||||
|
||||
%install
|
||||
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT
|
||||
%makeinstall
|
||||
mkdir -p "$RPM_BUILD_ROOT"/etc/init.d
|
||||
cp %{SOURCE1} "$RPM_BUILD_ROOT"/etc/init.d
|
||||
|
||||
|
||||
|
||||
%files
|
||||
%{_mandir}/man8/atftpd.8.gz
|
||||
%{_sbindir}/atftpd
|
||||
%{_mandir}/man8/in.tftpd.8.gz
|
||||
%{_sbindir}/in.tftpd
|
||||
/etc/init.d/tftpd
|
||||
|
||||
|
||||
%files client
|
||||
%{_mandir}/man1/atftp.1.gz
|
||||
%{_bindir}/atftp
|
||||
|
||||
|
||||
%preun
|
||||
|
||||
|
||||
%post
|
||||
if [ -x /usr/lib/lsb/install_initd ]; then
|
||||
/usr/lib/lsb/install_initd /etc/init.d/tftpd
|
||||
elif [ -x /sbin/chkconfig ]; then
|
||||
/sbin/chkconfig --add tftpd
|
||||
fi
|
||||
/etc/init.d/tftpd restart
|
||||
|
||||
|
||||
|
||||
%clean
|
||||
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != '/' ] && rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Oct 20 2007 Jarrod Johnson <jbj-at@ura.dnsalias.org>
|
||||
- Update with debian patch
|
||||
|
||||
* Tue Jan 07 2003 Thayne Harbaugh <thayne@plug.org>
|
||||
- put client in sub-rpm
|
5522
atftp/atftp_0.7.dfsg-3.diff
Normal file
5522
atftp/atftp_0.7.dfsg-3.diff
Normal file
File diff suppressed because it is too large
Load Diff
BIN
atftp/atftp_0.7.dfsg.orig.tar.gz
Normal file
BIN
atftp/atftp_0.7.dfsg.orig.tar.gz
Normal file
Binary file not shown.
67
atftp/tftpd
Executable file
67
atftp/tftpd
Executable file
@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
# chkconfig: 345 85 60
|
||||
# description: TFTP server
|
||||
# processname: atftpd
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: tftpd
|
||||
# Default-Start: 3 4 5
|
||||
# Default-stop: 0 1 2 6
|
||||
# Short-Description: atftp
|
||||
# Description: ATFTP server
|
||||
### END INIT INFO
|
||||
|
||||
|
||||
MStatus()
|
||||
{
|
||||
ps ax|grep -v grep|grep atftpd: >& /dev/null
|
||||
if [ "$?" = "0" ]; then
|
||||
RVAL=0
|
||||
echo "atftpd service is running"
|
||||
else
|
||||
RVAL=3
|
||||
echo "atftpd service is not running"
|
||||
fi
|
||||
return $RVAL
|
||||
}
|
||||
|
||||
if [ -f /lib/lsb/init-functions ]; then
|
||||
. /lib/lsb/init-functions
|
||||
START_DAEMON=start_daemon
|
||||
STATUS=MStatus
|
||||
LOG_SUCCESS=log_success_msg
|
||||
LOG_FAILURE=log_failure_msg
|
||||
LOG_WARNING=log_warning_message
|
||||
elif [ -f /etc/init.d/functions ]; then
|
||||
. /etc/init.d/functions
|
||||
START_DAEMON=daemon
|
||||
STATUS=status
|
||||
LOG_SUCCESS=success
|
||||
LOG_FAILURE=failure
|
||||
LOG_WARNING=passed
|
||||
else
|
||||
echo "Error, don't know how to start on this platform"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$STATUS
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping ATFTP "
|
||||
killproc atftpd
|
||||
;;
|
||||
start)
|
||||
echo -n "Starting ATFTP "
|
||||
$START_DAEMON atftpd --group nobody --daemon && $LOG_SUCCESS || $LOG_FAILURE
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user