arptables: Add man pages for arptables-{save,restore}
PATCH 1/1 arptables: Add man pages for arptables-{save,restore}
Also fixed up the Makefile to install these man pages.
--- userspace/arptables/Makefile | 15 +++++++---- userspace/arptables/arptables-restore.8 | 41 +++++++++++++++++++++++++++++++ userspace/arptables/arptables-save.8 | 37 ++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 userspace/arptables/arptables-restore.8 create mode 100644 userspace/arptables/arptables-save.8
userspace/arptables/Makefile +9 -6
@@ -5,11 +5,13 @@ KERNEL_DIR:=./ PREFIX:=/usr/local LIBDIR:=$(PREFIX)/lib BINDIR:=$(PREFIX)/sbin -MANDIR:=$(PREFIX)/man +MANDIR:=$(PREFIX)/man/man8 INITDIR:=/etc/rc.d/init.d SYSCONFIGDIR:=/etc/sysconfig DESTDIR:= +MANS = arptables.8 arptables-save.8 arptables-restore.8 + COPT_FLAGS:=-O2 CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
@@ -36,10 +38,6 @@ libarptc/libarptc.a: libarptc/libarptc.o arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -$(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8 - mkdir -p $(@D) - install -m 0644 $< $@ - $(DESTDIR)$(BINDIR)/arptables: arptables mkdir -p $(DESTDIR)$(BINDIR) install -m 0755 $< $@
@@ -57,8 +55,13 @@ scripts: arptables-save arptables-restore arptables.sysv if test -d $(DESTDIR)$(INITDIR); then install -m 0755 arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi rm -f arptables-save_ arptables-restore_ arptables.sysv_ +.PHONY: install-man +install-man: $(MANS) + [ -d "$(DESTDIR)$(MANDIR)" ] || mkdir -p "$(DESTDIR)$(MANDIR)" + install -m 0644 $^ $(DESTDIR)$(MANDIR)/ + .PHONY: install -install: $(DESTDIR)$(MANDIR)/man8/arptables.8 $(DESTDIR)$(BINDIR)/arptables scripts +install: install-man $(DESTDIR)$(BINDIR)/arptables scripts .PHONY: clean clean:
userspace/arptables/arptables-restore.8 new file +41 -0
41 lines not on this page · raw message
userspace/arptables/arptables-save.8 new file +37 -0
@@ -0,0 +1,37 @@ +.TH ARPTABLES-SAVE 8 "Nov 07, 2013" "" "" +.\" +.\" Man page written by Jesper Dangaard Brouer <[email protected]> based on a +.\" Man page written by Harald Welte <[email protected]> +.\" It is based on the iptables-save man page. +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +.\" +.\" +.SH NAME +arptables-save \(em dump arptables rules to stdout +.SH SYNOPSIS +\fBarptables\-save +.SH DESCRIPTION +.PP +.B arptables-save +is used to dump the contents of an ARP Table in easily parseable format +to STDOUT. Use I/O-redirection provided by your shell to write to a file. +.SH BUGS +None known as of arptables-0.0.4 release +.SH AUTHOR +Jesper Dangaard Brouer <[email protected]> +.SH SEE ALSO +\fBarptables\-restore\fP(8), \fBarptables\fP(8) +.PP
PATCH v2 1/1 arptables: Add man pages for arptables-{save,restore}
Also fixed up the Makefile to install these man pages.
---
V2: Don't add man8 to $MANDIR as it can be user redefined
userspace/arptables/Makefile | 14 +++++++---- userspace/arptables/arptables-restore.8 | 41 +++++++++++++++++++++++++++++++ userspace/arptables/arptables-save.8 | 37 ++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 userspace/arptables/arptables-restore.8 create mode 100644 userspace/arptables/arptables-save.8
userspace/arptables/Makefile +9 -5
@@ -6,10 +6,13 @@ PREFIX:=/usr/local LIBDIR:=$(PREFIX)/lib BINDIR:=$(PREFIX)/sbin MANDIR:=$(PREFIX)/man +man8dir=$(MANDIR)/man8 INITDIR:=/etc/rc.d/init.d SYSCONFIGDIR:=/etc/sysconfig DESTDIR:= +MANS = arptables.8 arptables-save.8 arptables-restore.8 + COPT_FLAGS:=-O2 CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
@@ -36,10 +39,6 @@ libarptc/libarptc.a: libarptc/libarptc.o arptables: arptables-standalone.o arptables.o libarptc/libarptc.o $(EXT_OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -$(DESTDIR)$(MANDIR)/man8/arptables.8: arptables.8 - mkdir -p $(@D) - install -m 0644 $< $@ - $(DESTDIR)$(BINDIR)/arptables: arptables mkdir -p $(DESTDIR)$(BINDIR) install -m 0755 $< $@
@@ -57,8 +56,13 @@ scripts: arptables-save arptables-restore arptables.sysv if test -d $(DESTDIR)$(INITDIR); then install -m 0755 arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi rm -f arptables-save_ arptables-restore_ arptables.sysv_ +.PHONY: install-man +install-man: $(MANS) + [ -d "$(DESTDIR)$(man8dir)" ] || mkdir -p "$(DESTDIR)$(man8dir)" + install -m 0644 $^ $(DESTDIR)$(man8dir)/ + .PHONY: install -install: $(DESTDIR)$(MANDIR)/man8/arptables.8 $(DESTDIR)$(BINDIR)/arptables scripts +install: install-man $(DESTDIR)$(BINDIR)/arptables scripts .PHONY: clean clean:
userspace/arptables/arptables-restore.8 new file +41 -0
41 lines not on this page · raw message
userspace/arptables/arptables-save.8 new file +37 -0
@@ -0,0 +1,37 @@ +.TH ARPTABLES-SAVE 8 "Nov 07, 2013" "" "" +.\" +.\" Man page written by Jesper Dangaard Brouer <[email protected]> based on a +.\" Man page written by Harald Welte <[email protected]> +.\" It is based on the iptables-save man page. +.\" +.\" This program is free software; you can redistribute it and/or modify +.\" it under the terms of the GNU General Public License as published by +.\" the Free Software Foundation; either version 2 of the License, or +.\" (at your option) any later version. +.\" +.\" This program is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this program; if not, write to the Free Software +.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +.\" +.\" +.SH NAME +arptables-save \(em dump arptables rules to stdout +.SH SYNOPSIS +\fBarptables\-save +.SH DESCRIPTION +.PP +.B arptables-save +is used to dump the contents of an ARP Table in easily parseable format +to STDOUT. Use I/O-redirection provided by your shell to write to a file. +.SH BUGS +None known as of arptables-0.0.4 release +.SH AUTHOR +Jesper Dangaard Brouer <[email protected]> +.SH SEE ALSO +\fBarptables\-restore\fP(8), \fBarptables\fP(8) +.PP
Quoted 19 lines · Jesper Dangaard Brouer
Also fixed up the
Makefileto install these man pages.Signed-off-by Jesper Dangaard Brouer <[email protected]>---
userspace/arptables/Makefile | 15 +++++++---- userspace/arptables/arptables-restore.8 | 41 +++++++++++++++++++++++++++++++ userspace/arptables/arptables-save.8 | 37 ++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 6 deletions(-)create mode 100644 userspace/arptables/arptables-restore.8 create mode 100644 userspace/arptables/arptables-save.8
userspace/arptables/Makefile +0
-0@@ -5,11 +5,13 @@ KERNEL_DIR:=./PREFIX:=/usr/local
LIBDIR:=$(PREFIX)/lib
BINDIR:=$(PREFIX)/sbin
userspace/arptables/Makefile KERNEL_DIR:=./ · line 8
Quoted 2 lines
userspace/arptables/Makefile +1
-1-MANDIR:=$(PREFIX)/man +MANDIR:=$(PREFIX)/man/man8
Self NACK
I must not add "/man8" to MANDIR, because it can be redefined by a user on the command line, when invoking make.
I'll send a new V2 patch fixing this.
Hilsen
Jesper Brouer
--
-------------------------------------------------------------------
MSc. Master of Computer Science
Dept. of Computer Science, University of Copenhagen Author of http://www.adsl-optimizer.dk
-------------------------------------------------------------------