add experimental support for an alternate shell for service scripts

This is for #288.
This commit is contained in:
William Hubbs 2019-02-07 17:08:12 -06:00
parent b2b2c57a38
commit d64c9d2050
5 changed files with 11 additions and 3 deletions

View File

@ -4,6 +4,13 @@ OpenRC NEWS
This file will contain a list of notable changes for each release. Note This file will contain a list of notable changes for each release. Note
the information in this file is in reverse order. the information in this file is in reverse order.
## OpenRC 0.41.
This version adds an experimental build time switch to allow setting the
default shell to use for service scripts.
By default, this is set to /bin/sh if it is changed, the new shell must
be able to understand posix-compatible syntax.
## OpenRC 0.40 ## OpenRC 0.40
In this version, the keymaps and termencoding services on Linux needed In this version, the keymaps and termencoding services on Linux needed

View File

@ -38,6 +38,7 @@ PKG_PREFIX=/usr/pkg
LOCAL_PREFIX=/usr/local LOCAL_PREFIX=/usr/local
PREFIX=/usr/local PREFIX=/usr/local
BRANDING=\"Gentoo/$(uname -s)\" BRANDING=\"Gentoo/$(uname -s)\"
SH=/bin/sh
``` ```
## Notes ## Notes

View File

@ -19,7 +19,7 @@ _PKG_SED:= $(shell ${_PKG_SED_SH})
_LCL_SED_SH= if test "${PREFIX}" = "${LOCAL_PREFIX}"; then echo "-e 's:@LOCAL_PREFIX@::g'"; else echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; fi _LCL_SED_SH= if test "${PREFIX}" = "${LOCAL_PREFIX}"; then echo "-e 's:@LOCAL_PREFIX@::g'"; else echo "-e 's:@LOCAL_PREFIX@:${LOCAL_PREFIX}:g'"; fi
_LCL_SED:= $(shell ${_LCL_SED_SH}) _LCL_SED:= $(shell ${_LCL_SED_SH})
SED_REPLACE= -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' -e 's:@BINDIR@:${BINDIR}:g' -e 's:@SBINDIR@:${SBINDIR}:g' ${_PKG_SED} ${_LCL_SED} SED_REPLACE= -e 's:@SHELL@:${SH}:' -e 's:@LIB@:${LIBNAME}:g' -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' -e 's:@PREFIX@:${PREFIX}:g' -e 's:@BINDIR@:${BINDIR}:g' -e 's:@SBINDIR@:${SBINDIR}:g' ${_PKG_SED} ${_LCL_SED}
# Tweak our shell scripts # Tweak our shell scripts
%.sh: %.sh.in %.sh: %.sh.in

View File

@ -1,4 +1,4 @@
#!/bin/sh #!@SHELL@
# Shell wrapper to list our dependencies # Shell wrapper to list our dependencies
# Copyright (c) 2007-2015 The OpenRC Authors. # Copyright (c) 2007-2015 The OpenRC Authors.

View File

@ -1,4 +1,4 @@
#!/bin/sh #!@SHELL@
# Shell wrapper for openrc-run # Shell wrapper for openrc-run
# Copyright (c) 2007-2015 The OpenRC Authors. # Copyright (c) 2007-2015 The OpenRC Authors.