Browse Source

Ensure, that we source rc.subr and parse rc.conf ONLY if we are not

inside /etc/rc.
With help from and OK halex@, ajacoutot@
OPENBSD_5_8
rpe 9 years ago
parent
commit
52fcd40cbb
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      src/etc/netstart

+ 6
- 4
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: netstart,v 1.147 2015/07/18 00:37:23 rpe Exp $ # $OpenBSD: netstart,v 1.148 2015/07/19 01:37:45 rpe Exp $
# Strip comments (and leading/trailing whitespace if IFS is set) from a file # Strip comments (and leading/trailing whitespace if IFS is set) from a file
# and spew to stdout. # and spew to stdout.
@ -149,9 +149,11 @@ ifmstart() {
done done
} }
# Re-read rc.subr if we are not inside /etc/rc. # Source rc.subr and parse rc.conf only if we are not inside /etc/rc.
[ -n ${INRC} ] && FUNCS_ONLY=1 . /etc/rc.d/rc.subr if [ -z "${INRC}" ]; then
_rc_parse_conf FUNCS_ONLY=1 . /etc/rc.d/rc.subr
_rc_parse_conf
fi
# If we were invoked with a list of interface names, just reconfigure these # If we were invoked with a list of interface names, just reconfigure these
# interfaces (or bridges) and return. # interfaces (or bridges) and return.


|||||||
|||||||
xxxxxxxxxx
 
000:0
x
 
000:0
Loading…
Cancel
Save