checkbashisms: clean up export statements.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
This commit is contained in:
Robin H. Johnson 2012-11-07 00:22:33 +00:00
parent 3809eac54d
commit 1b0130961e
13 changed files with 24 additions and 20 deletions

View File

@ -101,7 +101,7 @@
# Some daemons are started and stopped via start-stop-daemon. # Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel. # We can set some things on a per service basis, like the nicelevel.
#export SSD_NICELEVEL="-19" #SSD_NICELEVEL="-19"
# Pass ulimit parameters # Pass ulimit parameters
#rc_ulimit="-u 30" #rc_ulimit="-u 30"

View File

@ -3,8 +3,9 @@
# Released under the 2-clause BSD license. # Released under the 2-clause BSD license.
# Inform RC that we are in the background and hotplugged # Inform RC that we are in the background and hotplugged
export IN_BACKGROUND=yes IN_BACKGROUND=yes
export IN_HOTPLUG=yes IN_HOTPLUG=yes
export IN_BACKGROUND IN_HOTPLUG
getmedia() { getmedia() {
ifconfig "$1" | while read line; do ifconfig "$1" | while read line; do

View File

@ -4,7 +4,7 @@
# If $TERM is not set then assume default of @TERM@ # If $TERM is not set then assume default of @TERM@
# This gives us a nice colour boot :) # This gives us a nice colour boot :)
[ -z "$TERM" -o "$TERM" = "dumb" ] && export TERM="@TERM@" [ -z "$TERM" -o "$TERM" = "dumb" ] && TERM="@TERM@" && export TERM
# Handle interrupts # Handle interrupts
trap : SIGINT trap : SIGINT

View File

@ -7,11 +7,11 @@ trap : SIGINT SIGQUIT
# Try and use stuff in /lib over anywhere else so we can shutdown # Try and use stuff in /lib over anywhere else so we can shutdown
# local mounts correctly. # local mounts correctly.
export LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}" LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}" ; export LD_LIBRARY_PATH
# If $TERM is not set then assume default of @TERM@ # If $TERM is not set then assume default of @TERM@
# This gives us a nice colour boot :) # This gives us a nice colour boot :)
[ -z "$TERM" -o "$TERM" = "dumb" ] && export TERM="@TERM@" [ -z "$TERM" -o "$TERM" = "dumb" ] && TERM="@TERM@" && export TERM
action=${1:-shutdown} action=${1:-shutdown}
exec /sbin/rc "${action}" exec /sbin/rc "${action}"

View File

@ -85,13 +85,13 @@ if [ -n "$_LOCAL_PREFIX" ]; then
_PATH="$_PATH:$_LOCAL_PREFIX/bin:$_LOCAL_PREFIX/sbin" _PATH="$_PATH:$_LOCAL_PREFIX/bin:$_LOCAL_PREFIX/sbin"
fi fi
_path="$(_sanitize_path "$PATH")" _path="$(_sanitize_path "$PATH")"
export PATH="$_PATH${_path:+:}$_path" PATH="$_PATH${_path:+:}$_path" ; export PATH
unset _sanitize_path _PREFIX _PKG_PREFIX _LOCAL_PREFIX _PATH _path unset _sanitize_path _PREFIX _PKG_PREFIX _LOCAL_PREFIX _PATH _path
for arg; do for arg; do
case "$arg" in case "$arg" in
--nocolor|--nocolour|-C) --nocolor|--nocolour|-C)
export EINFO_COLOR="NO" EINFO_COLOR="NO" ; export EINFO_COLOR
;; ;;
esac esac
done done
@ -106,7 +106,7 @@ else
for _e in ebegin eend error errorn einfo einfon ewarn ewarnn ewend \ for _e in ebegin eend error errorn einfo einfon ewarn ewarnn ewend \
vebegin veend veinfo vewarn vewend; do vebegin veend veinfo vewarn vewend; do
eval "$_e() { local _r; command $_e \"\$@\"; _r=\$?; \ eval "$_e() { local _r; command $_e \"\$@\"; _r=\$?; \
export EINFO_LASTCMD=$_e; return \$_r; }" EINFO_LASTCMD=$_e; export EINFO_LASTCMD ; return \$_r; }"
done done
unset _e unset _e
fi fi

View File

@ -58,10 +58,10 @@ do
continue continue
unset one two three unset one two three
export RC_SVCNAME=${RC_SERVICE##*/} RC_SVCNAME=${RC_SERVICE##*/} ; export RC_SVCNAME
# Compat # Compat
export SVCNAME=$RC_SVCNAME SVCNAME=$RC_SVCNAME ; export SVCNAME
( (
# Save stdout in fd3, then remap it to stderr # Save stdout in fd3, then remap it to stderr

View File

@ -1,5 +1,5 @@
#!@SHELL@ #!@SHELL@
# Wrapper for ifwatchd(8) # Wrapper for ifwatchd(8)
export IN_BACKGROUND=yes IN_BACKGROUND=yes ; export IN_BACKGROUND
$RC_SERVICE --quiet start $RC_SERVICE --quiet start

View File

@ -1,5 +1,5 @@
#!@SHELL@ #!@SHELL@
# Wrapper for ifwatchd(8) # Wrapper for ifwatchd(8)
export IN_BACKGROUND=yes IN_BACKGROUND=yes ; export IN_BACKGROUND
$RC_SERVICE --quiet stop $RC_SERVICE --quiet stop

View File

@ -109,5 +109,5 @@ _depend() {
# Add our sbin to $PATH # Add our sbin to $PATH
case "$PATH" in case "$PATH" in
"$RC_LIBEXECDIR"/sbin|"$RC_LIBEXECDIR"/sbin:*);; "$RC_LIBEXECDIR"/sbin|"$RC_LIBEXECDIR"/sbin:*);;
*) export PATH="$RC_LIBEXECDIR/sbin:$PATH";; *) PATH="$RC_LIBEXECDIR/sbin:$PATH" ; export PATH ;;
esac esac

View File

@ -46,11 +46,11 @@ if [ -z "$1" -o -z "$2" ]; then
fi fi
# So daemons know where to recall us if needed # So daemons know where to recall us if needed
export RC_SERVICE="$1" RC_SERVICE="$1" ; export RC_SERVICE
shift shift
# Compat # Compat
export SVCNAME=$RC_SVCNAME SVCNAME=$RC_SVCNAME ; export SVCNAME
# Dependency function # Dependency function
config() { config() {

View File

@ -18,7 +18,8 @@ fi
# Re-enter the init script to stop any dependant services # Re-enter the init script to stop any dependant services
if [ -x "${RC_SERVICE}" ]; then if [ -x "${RC_SERVICE}" ]; then
if "${RC_SERVICE}" --quiet status; then if "${RC_SERVICE}" --quiet status; then
export IN_BACKGROUND=YES IN_BACKGROUND=YES
export IN_BACKGROUND
"${RC_SERVICE}" --quiet stop "${RC_SERVICE}" --quiet stop
fi fi
fi fi

View File

@ -64,7 +64,8 @@ fi
# Re-enter the init script to start any dependant services # Re-enter the init script to start any dependant services
if [ -x "${RC_SERVICE}" ]; then if [ -x "${RC_SERVICE}" ]; then
if ! "${RC_SERVICE}" --quiet status; then if ! "${RC_SERVICE}" --quiet status; then
export IN_BACKGROUND=true IN_BACKGROUND=YES
export IN_BACKGROUND
"${RC_SERVICE}" --quiet start "${RC_SERVICE}" --quiet start
fi fi
fi fi

View File

@ -17,8 +17,9 @@ elif ! . ${top_srcdir}/sh/functions.sh; then
exit 1 exit 1
fi fi
export LD_LIBRARY_PATH=${top_builddir}/src/libeinfo:${top_builddir}/src/librc:${LD_LIBRARY_PATH} LD_LIBRARY_PATH=${top_builddir}/src/libeinfo:${top_builddir}/src/librc:${LD_LIBRARY_PATH}
export PATH=${top_builddir}/src/rc:${PATH} PATH=${top_builddir}/src/rc:${PATH}
export LD_LIBRARY_PATH PATH
cd ${top_srcdir}/src/rc cd ${top_srcdir}/src/rc
${MAKE:-make} links >/dev/null ${MAKE:-make} links >/dev/null