Browse Source

Disable Strict Bourne shell mode for /etc/rc and /etc/netstart to be

able to use ksh syntax within these scripts. This way init doesn't
need to be changed, which starts /etc/rc using /bin/sh and people
can still use "sh /etc/netstart ifname".
Idea from and OK halex@
OK deraadt@ krw@ guenther@
OPENBSD_5_8
rpe 9 years ago
parent
commit
ee8831258e
2 changed files with 8 additions and 2 deletions
  1. +4
    -1
      src/etc/netstart
  2. +4
    -1
      src/etc/rc

+ 4
- 1
src/etc/netstart View File

@ -1,6 +1,9 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: netstart,v 1.152 2015/07/19 23:42:58 florian Exp $
# $OpenBSD: netstart,v 1.153 2015/07/20 06:59:39 rpe Exp $
# Turn off Strict Bourne shell mode.
set +o sh
# 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.


+ 4
- 1
src/etc/rc View File

@ -1,9 +1,12 @@
# $OpenBSD: rc,v 1.453 2015/07/19 04:44:36 rpe Exp $
# $OpenBSD: rc,v 1.454 2015/07/20 06:59:39 rpe Exp $
# System startup script run by init on autoboot or after single-user. # System startup script run by init on autoboot or after single-user.
# Output and error are redirected to console by init, and the console is the # Output and error are redirected to console by init, and the console is the
# controlling terminal. # controlling terminal.
# Turn off Strict Bourne shell.
set +o sh
# Subroutines (have to come first). # Subroutines (have to come first).


Loading…
Cancel
Save