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
#!/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
}
-.\" $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.
.\"
.\" @(#)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