summaryrefslogtreecommitdiff
path: root/usr.sbin/mopd/otherOS/linux2
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mopd/otherOS/linux2')
-rw-r--r--usr.sbin/mopd/otherOS/linux2/Makefile12
-rw-r--r--usr.sbin/mopd/otherOS/linux2/mopd-x.x.x.spec74
-rw-r--r--usr.sbin/mopd/otherOS/linux2/mopd.init50
3 files changed, 136 insertions, 0 deletions
diff --git a/usr.sbin/mopd/otherOS/linux2/Makefile b/usr.sbin/mopd/otherOS/linux2/Makefile
new file mode 100644
index 00000000000..1d4596fcf9f
--- /dev/null
+++ b/usr.sbin/mopd/otherOS/linux2/Makefile
@@ -0,0 +1,12 @@
+# Copyright (c) 1999 Mats O Jansson, Stockholm, Sweden
+# All rights reserved.
+#
+# @(#) $OpenBSD: Makefile,v 1.1 1999/03/27 14:31:23 maja Exp $
+
+INSTBIN= install -c -s -o root -g root -m 755
+INSTINIT= install -c -o root -g root -m 755
+
+install: mopd.init
+ echo "Installing files in linux2";
+ $(INSTINIT) $< $(INSTALL)/etc/rc.d/init.d/mopd
+
diff --git a/usr.sbin/mopd/otherOS/linux2/mopd-x.x.x.spec b/usr.sbin/mopd/otherOS/linux2/mopd-x.x.x.spec
new file mode 100644
index 00000000000..c5fdc87d6ab
--- /dev/null
+++ b/usr.sbin/mopd/otherOS/linux2/mopd-x.x.x.spec
@@ -0,0 +1,74 @@
+# $OpenBSD: mopd-x.x.x.spec,v 1.1 1999/03/27 14:31:23 maja Exp $
+Summary: MOP (Maintenance Operations Protocol) loader daemon
+Name: mopd
+Version: 2.5.4
+Release: 2
+Copyright: BSD
+Group: Networking
+Source: ftp://ftp.stacken.kth.se/pub/NetBSD/mopd/mopd-2.5.4.tar.gz
+BuildRoot: /var/tmp/mopd-2.5.4
+Packager: Mats O Jansson <moj@stacken.kth.se>
+
+%description
+Mopd services MOP Load requests on the Ethernet connected to interface or
+all interfaces if a `-a' is given. In a load request received by mopd a
+filename can be given. This is the normal case for e.g. terminal servers.
+If a filename isn't given mopd must know what image to load.
+
+Upon receiving a request, mopd checks if the requested file exists in
+/tftpboot/mop, the filename is normaly uppercase and with an extension of
+.SYS. If the filename isn't given, the ethernet address of the target is
+used as filename, e.g. 08002b09f4de.SYS and it might be a soft link to
+another file.
+
+Mopd supports two kinds of files. The first type that is check is if the
+file is in a.out(5) format. If not, a couple of Digital's formats are
+checked.
+
+%prep
+%setup -q -c mopd-2.5.4
+
+%build
+(cd otherOS && make)
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p -m 755 $RPM_BUILD_ROOT/etc/rc.d/init.d
+mkdir -p -m 755 $RPM_BUILD_ROOT/usr/man/man1
+mkdir -p -m 755 $RPM_BUILD_ROOT/usr/man/man8
+mkdir -p -m 755 $RPM_BUILD_ROOT/usr/sbin
+mkdir -p -m 755 $RPM_BUILD_ROOT/tftpboot/mop
+(cd otherOS && make INSTALL="$RPM_BUILD_ROOT" install)
+
+%clean
+cd ..
+rm -rf mopd-2.5.4
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add mopd
+
+%postun
+if [ $1 = 0 ]; then
+ /sbin/chkconfig --del mopd
+fi
+
+%files
+%attr(755, root, root) /tftpboot/mop
+%attr(755, root, root) /usr/sbin/mopchk
+%attr(644, root, root) /usr/man/man1/mopchk.1
+%attr(755, root, root) /usr/sbin/mopd
+%attr(644, root, root) /usr/man/man8/mopd.8
+%attr(755, root, root) /usr/sbin/mopprobe
+%attr(644, root, root) /usr/man/man1/mopprobe.1
+%attr(755, root, root) /usr/sbin/moptrace
+%attr(644, root, root) /usr/man/man1/moptrace.1
+%config %attr(755, root, root) /etc/rc.d/init.d/mopd
+
+%changelog
+* Fri Mar 26 1998 Mats O Jansson <moj@stacken.kth.se>
+- incorparated lots of ideas from <xenophon@irtnog.org> who had written
+ the mopd-linux-2.5.3 package.
+
+* Wed Mar 24 1998 Mats O Jansson <moj@stacken.kth.se>
+- initial build
diff --git a/usr.sbin/mopd/otherOS/linux2/mopd.init b/usr.sbin/mopd/otherOS/linux2/mopd.init
new file mode 100644
index 00000000000..e037db17e4f
--- /dev/null
+++ b/usr.sbin/mopd/otherOS/linux2/mopd.init
@@ -0,0 +1,50 @@
+#! /bin/sh
+# $OpenBSD: mopd.init,v 1.1 1999/03/27 14:31:23 maja Exp $
+#
+# chkconfig: - 60 20
+# description: The mopd server allows older DEC workstations to net boot \
+# from Linux boxes. It (along with rarp) is rarely used anymore; \
+# bootp and dhcp have mostly replaced both of them.
+# processname: mopd
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# Get config.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+if [ ${NETWORKING} = "no" ]
+then
+ exit 0
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting mopd services: "
+ daemon mopd -a
+
+ echo
+ touch /var/lock/subsys/mopd
+ ;;
+ stop)
+ echo -n "Stopping mopd services: "
+ killproc mopd
+
+ echo
+ rm -f /var/lock/subsys/mopd
+ ;;
+ status)
+ status mopd
+ ;;
+ restart|reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: mopd {start|stop|status|restart|reload}"
+ exit 1
+esac
+
+exit 0