Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add experimental support for an alternate shell for service scripts
This is for #288.
  • Loading branch information
williamh committed Feb 14, 2019
1 parent b2b2c57 commit d64c9d2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
7 changes: 7 additions & 0 deletions NEWS.md
Expand Up @@ -4,6 +4,13 @@ OpenRC NEWS
This file will contain a list of notable changes for each release. Note
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

In this version, the keymaps and termencoding services on Linux needed
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -38,6 +38,7 @@ PKG_PREFIX=/usr/pkg
LOCAL_PREFIX=/usr/local
PREFIX=/usr/local
BRANDING=\"Gentoo/$(uname -s)\"
SH=/bin/sh
```

## Notes
Expand Down
2 changes: 1 addition & 1 deletion mk/scripts.mk
Expand Up @@ -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:= $(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
%.sh: %.sh.in
Expand Down
2 changes: 1 addition & 1 deletion sh/gendepends.sh.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!@SHELL@
# Shell wrapper to list our dependencies

# Copyright (c) 2007-2015 The OpenRC Authors.
Expand Down
2 changes: 1 addition & 1 deletion sh/openrc-run.sh.in
@@ -1,4 +1,4 @@
#!/bin/sh
#!@SHELL@
# Shell wrapper for openrc-run

# Copyright (c) 2007-2015 The OpenRC Authors.
Expand Down

0 comments on commit d64c9d2

Please sign in to comment.