From ec91095e49e1bf3c38f19ff13599935a10755ff8 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 21 Apr 2026 21:13:53 +0200 Subject: [PATCH] add init scrips to doc dir --- doc/debian/init.d | 76 ++++++++++++++++++++++++++++++ doc/debian/logrotate | 9 ++++ doc/gentoo/mars-nwe.initd | 25 ++++++++++ doc/gentoo/mars-nwe.tmpfilesd | 1 + doc/gentoo/smart.pamd | 9 ++++ doc/nwserv.8 | 71 ++++++++++++++++++++++++++++ doc/pld/nwserv.init | 88 +++++++++++++++++++++++++++++++++++ 7 files changed, 279 insertions(+) create mode 100644 doc/debian/init.d create mode 100644 doc/debian/logrotate create mode 100644 doc/gentoo/mars-nwe.initd create mode 100644 doc/gentoo/mars-nwe.tmpfilesd create mode 100644 doc/gentoo/smart.pamd create mode 100644 doc/nwserv.8 create mode 100644 doc/pld/nwserv.init diff --git a/doc/debian/init.d b/doc/debian/init.d new file mode 100644 index 0000000..92624cc --- /dev/null +++ b/doc/debian/init.d @@ -0,0 +1,76 @@ +#! /bin/sh +# +# skeleton example file to build /etc/init.d/ scripts. +# This file should be used to construct scripts for /etc/init.d. +# +# Written by Miquel van Smoorenburg . +# Modified for Debian GNU/Linux +# by Ian Murdock . +# +# Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl +# +# This file was automatically customized by dh-make on Sun, 15 Apr 2001 14:14:57 +0100 + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/nwserv +NAME=nwserv +DESC="Netware server (mars-nwe)" + +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + test -f /etc/mars-nwe/nwserv.conf || exit 0 + if grep -q "^### NOT CONFIGURED YET ###" /etc/mars-nwe/nwserv.conf + then + echo "mars-nwe has not yet been configured." + exit 0; + fi + echo -n "Starting $DESC: " + start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ + --exec $DAEMON + echo "$NAME." + ;; + reload) + # + # If the daemon can reload its config files on the fly + # for example by sending it SIGHUP, do it here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this a do-nothing entry. + # + echo "Reloading $DESC configuration files." + start-stop-daemon --stop --signal 1 --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + ;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + echo -n "Restarting $DESC: " + start-stop-daemon --stop --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + sleep 1 + start-stop-daemon --start --quiet --pidfile \ + /var/run/$NAME.pid --exec $DAEMON + echo "$NAME." + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/doc/debian/logrotate b/doc/debian/logrotate new file mode 100644 index 0000000..208f24b --- /dev/null +++ b/doc/debian/logrotate @@ -0,0 +1,9 @@ + +/var/log/mars-nwe/* { + compress + copytruncate + rotate 5 + daily + missingok + notifempty +} diff --git a/doc/gentoo/mars-nwe.initd b/doc/gentoo/mars-nwe.initd new file mode 100644 index 0000000..9fc38fb --- /dev/null +++ b/doc/gentoo/mars-nwe.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net ipx +} + +mkdir_marsnwedirs() { + [ -d /run/mars_nwe ] || mkdir -p /run/mars_nwe +} + +start() { + ebegin "Starting Martin Stovers NetWare-Emulator" + mkdir_marsnwedirs + eval start-stop-daemon --start --quiet --exec /usr/sbin/nwserv --pidfile /run/mars_nwe/nwserv.pid + eend $? +} + +stop() { + ebegin "Stopping Martin Stovers NetWare-Emulator" + start-stop-daemon --stop --quiet --pidfile /run/mars_nwe/nwserv.pid + eend $? +} diff --git a/doc/gentoo/mars-nwe.tmpfilesd b/doc/gentoo/mars-nwe.tmpfilesd new file mode 100644 index 0000000..abf5277 --- /dev/null +++ b/doc/gentoo/mars-nwe.tmpfilesd @@ -0,0 +1 @@ +d /run/mars_nwe 710 root root diff --git a/doc/gentoo/smart.pamd b/doc/gentoo/smart.pamd new file mode 100644 index 0000000..ce9e84d --- /dev/null +++ b/doc/gentoo/smart.pamd @@ -0,0 +1,9 @@ +#%PAM-1.0 + +auth include system-local-login + +account include system-local-login + +password include system-local-login + +session include system-local-login diff --git a/doc/nwserv.8 b/doc/nwserv.8 new file mode 100644 index 0000000..541d26d --- /dev/null +++ b/doc/nwserv.8 @@ -0,0 +1,71 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH NWSERV 8 "April 16, 2001" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +nwserv \- netware server +.SH SYNOPSIS +.B nwserv +.RI [ -V|-h|-f|-u|-k[q]|y ] +.br +.B nwserv +-a device frame netnum +.br +.B nwserv +-d device frame +.SH DESCRIPTION +This manual page documents briefly the +.B nwserv +command. +This manual page was written for the Debian GNU/Linux distribution +because the original program does not have a manual page. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invode bold face and italics, +.\" respectively. +\fBnwserv\fP is a program that... +.SH OPTIONS +A summary of options is included below. +.TP +.B \-V +Show version of program. +.TP +.B \-a +Add interface, frames = '802.2' '802.3' 'etherii' 'snap' +.TP +.B \-d +Delete interface. +.TP +.B \-h +Send HUP to main process. This causes it to reread nwserv.conf. +.TP +.B \-f +force send rip/sap and update routing int. table +.TP +.B \-u +Update internal routing table. +.TP +.B \-k +Stop the main process, and wait for it to exit. +.TP +.B \-kq +Stop the main process, but don't wait for it to exit. +.TP +.B y +Start testclient code. +.SH AUTHOR +This manual page was written by Paul Martin , +for the Debian GNU/Linux system (but may be used by others). diff --git a/doc/pld/nwserv.init b/doc/pld/nwserv.init new file mode 100644 index 0000000..59970c0 --- /dev/null +++ b/doc/pld/nwserv.init @@ -0,0 +1,88 @@ +#!/bin/sh +# +# nwserv MARS NetWare - NetWare compatible file and printer server +# +# chkconfig: 345 62 35 +# description: MARS is a NetWare compatible file and printer server. It \ +# lets you use a Linux machine as a file and print server for \ +# NetWare based clients using NetWare's native IPX protocol suite. +# processname: nwserv +# processname: nwbind +# processname: ncpserv +# config: /etc/nwserv/nwserv.stations +# config: /etc/nwserv/nwserv.conf +# pidfile: /var/run/nwserv.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Get network config +. /etc/sysconfig/network + +# Get service config - may override defaults +[ -f /etc/sysconfig/nwserv ] && . /etc/sysconfig/nwserv + +# Check that networking is up. +if is_yes "${NETWORKING}"; then + if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then + msg_network_down "MARS NetWare" + exit 1 + fi +else + exit 0 +fi + +RETVAL=0 +case "$1" in + start) + # Check if the service is already running? + if [ ! -f /var/lock/subsys/nwserv ]; then + msg_starting "MARS NetWare" + daemon nwserv + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nwserv + else + msg_already_running "MARS NetWare" + fi + ;; + stop) + # Stop daemons. + if [ -f /var/lock/subsys/nwserv ]; then + msg_stopping "MARS NetWare" + killproc nwserv + msg_stopping "MARS ncpserv" + killproc ncpserv + msg_stopping "MARS binder" + killproc nwbind + show "Stopping MARS: stopping all connections" + killproc nwconn + rm -f /var/lock/subsys/nwserv >/dev/null 2>&1 + else + msg_not_running "MARS NetWare" + fi + ;; + restart) + $0 stop + $0 start + exit $? + ;; + reload|force-reload) + if [ -f /var/lock/subsys/nwserv ]; then + msg_reloading "MARS NetWare" + killproc nwserv -HUP + RETVAL=$? + else + msg_not_running "MARS NetWare" >&2 + exit 7 + fi + ;; + status) + status nwserv + exit $? + ;; + *) + msg_usage "$0 {start|stop|restart|reload|force-reload|status}" + exit 3 +esac + +exit $RETVAL