Name

line-banner — chain-load utility for printing 1-line banners

Synopsis

line-banner [--NVT] {banner} {next-prog}

Description

line-banner is a chain-loading utility that prints the 1-line banner banner (followed by a newline) to its standard output, and then chain loads to next-prog with the execvp(3) function.

next-prog may contain its own command line options, which line-banner will ignore.

line-banner makes no alteration to process state.

If the --NVT command-line option is used, the newline follows the Network Virtual Terminal convention of carriage return plus a linefeed. Normally, it follows the Unix convention of just a linefeed.

EXAMPLE

The following nosh(1) script wraps the ftpd(1) server from the publicfile package, which requires that the initial 220 response be written before the daemon is invoked.

#!/bin/nosh
fdmove -c 2 1
envuidgid publicfile
softlimit -o 20 -d 50000
tcp-socket-listen -b 2 0 80
tcp-socket-accept -v -c 2 -x cdb.tcp -l 0 --no-delay
line-banner --NVT "220 Features: a p ."
ftpd /home/publicfile/public

This is the sh(1) equivalent:

#!/bin/sh -e
exec 2<>&1 \
envuidgid publicfile \
softlimit -o 20 -d 50000 \
tcp-socket-listen -b 2 0 80 \
tcp-socket-accept -v -c 2 -x cdb.tcp -l 0 --no-delay \
line-banner --NVT '220 Features: a p .' \
ftpd /home/publicfile/public

Author

Jonathan de Boyne Pollard