From f2bb62614219ad6d7c70eab82c15b81448b9801c Mon Sep 17 00:00:00 2001 From: kn Date: Mon, 24 Oct 2022 17:58:43 +0000 Subject: [PATCH] Add required sh(1) to synopsis Contrary to other scripts in base like rc.d(8) or MAKEDEV(8), netstart(8) itself is not executable and must be passed as file to sh(1): $ man -h netstart /etc/netstart [-n] [interface ...] $ /etc/netstart ksh: /etc/netstart: cannot execute - Permission denied Fix usage and synopsis to provide required usage: $ man -h netsart sh /etc/netstart [-n] [interface ...] OK jmc --- etc/netstart | 4 ++-- share/man/man8/netstart.8 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/etc/netstart b/etc/netstart index 88856d5a3db..974601ca971 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,13 +1,13 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.220 2022/10/21 12:04:51 kn Exp $ +# $OpenBSD: netstart,v 1.221 2022/10/24 17:58:43 kn Exp $ # Turn off Strict Bourne shell mode. set +o sh # Show usage of the netstart script and exit. usage() { - print -u2 "usage: ${0##*/} [-n] [interface ...]" + print -u2 "usage: sh ${0##*/} [-n] [interface ...]" exit 1 } diff --git a/share/man/man8/netstart.8 b/share/man/man8/netstart.8 index 525d52a69af..3222b58e97c 100644 --- a/share/man/man8/netstart.8 +++ b/share/man/man8/netstart.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: netstart.8,v 1.28 2022/10/21 12:04:51 kn Exp $ +.\" $OpenBSD: netstart.8,v 1.29 2022/10/24 17:58:43 kn Exp $ .\" .\" Copyright (c) 2002, Miodrag Vallat. .\" All rights reserved. @@ -25,14 +25,14 @@ .\" .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" -.Dd $Mdocdate: October 21 2022 $ +.Dd $Mdocdate: October 24 2022 $ .Dt NETSTART 8 .Os .Sh NAME .Nm netstart .Nd command script for network startup .Sh SYNOPSIS -.Nm /etc/netstart +.Cm sh Pa /etc/netstart .Op Fl n .Op Ar interface ... .Sh DESCRIPTION -- 2.20.1