aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2012-11-07 00:22:33 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2012-11-07 00:22:33 +0000
commit1b0130961ebc308bba4c9ced3988558bfac103d9 (patch)
tree40dcef0a3f194d4741a8ae3ea9c12015e0bc89df
parent3809eac54d575d52d8793df38f826f1d7d7398fb (diff)
checkbashisms: clean up export statements.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--etc/rc.conf.in2
-rw-r--r--etc/rc.devd5
-rw-r--r--etc/rc.in2
-rw-r--r--etc/rc.shutdown.in4
-rw-r--r--sh/functions.sh.in6
-rw-r--r--sh/gendepends.sh.in4
-rw-r--r--sh/ifwatchd-carrier.sh.in2
-rw-r--r--sh/ifwatchd-nocarrier.sh.in2
-rw-r--r--sh/rc-functions.sh.in2
-rw-r--r--sh/runscript.sh.in4
-rwxr-xr-xsupport/openvpn/down.sh3
-rwxr-xr-xsupport/openvpn/up.sh3
-rwxr-xr-xtest/setup_env.sh5
13 files changed, 24 insertions, 20 deletions
diff --git a/etc/rc.conf.in b/etc/rc.conf.in
index e49a410c..1536aa5b 100644
--- a/etc/rc.conf.in
+++ b/etc/rc.conf.in
@@ -101,7 +101,7 @@
# Some daemons are started and stopped via start-stop-daemon.
# We can set some things on a per service basis, like the nicelevel.
-#export SSD_NICELEVEL="-19"
+#SSD_NICELEVEL="-19"
# Pass ulimit parameters
#rc_ulimit="-u 30"
diff --git a/etc/rc.devd b/etc/rc.devd
index 272a413a..11f27ebf 100644
--- a/etc/rc.devd
+++ b/etc/rc.devd
@@ -3,8 +3,9 @@
# Released under the 2-clause BSD license.
# Inform RC that we are in the background and hotplugged
-export IN_BACKGROUND=yes
-export IN_HOTPLUG=yes
+IN_BACKGROUND=yes
+IN_HOTPLUG=yes
+export IN_BACKGROUND IN_HOTPLUG
getmedia() {
ifconfig "$1" | while read line; do
diff --git a/etc/rc.in b/etc/rc.in
index a58ff1eb..864bd1ba 100644
--- a/etc/rc.in
+++ b/etc/rc.in
@@ -4,7 +4,7 @@
# If $TERM is not set then assume default of @TERM@
# 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
trap : SIGINT
diff --git a/etc/rc.shutdown.in b/etc/rc.shutdown.in
index 92aef92e..216e2f84 100644
--- a/etc/rc.shutdown.in
+++ b/etc/rc.shutdown.in
@@ -7,11 +7,11 @@ trap : SIGINT SIGQUIT
# Try and use stuff in /lib over anywhere else so we can shutdown
# 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@
# 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}
exec /sbin/rc "${action}"
diff --git a/sh/functions.sh.in b/sh/functions.sh.in
index cdd88563..23f3f627 100644
--- a/sh/functions.sh.in
+++ b/sh/functions.sh.in
@@ -85,13 +85,13 @@ if [ -n "$_LOCAL_PREFIX" ]; then
_PATH="$_PATH:$_LOCAL_PREFIX/bin:$_LOCAL_PREFIX/sbin"
fi
_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
for arg; do
case "$arg" in
--nocolor|--nocolour|-C)
- export EINFO_COLOR="NO"
+ EINFO_COLOR="NO" ; export EINFO_COLOR
;;
esac
done
@@ -106,7 +106,7 @@ else
for _e in ebegin eend error errorn einfo einfon ewarn ewarnn ewend \
vebegin veend veinfo vewarn vewend; do
eval "$_e() { local _r; command $_e \"\$@\"; _r=\$?; \
- export EINFO_LASTCMD=$_e; return \$_r; }"
+ EINFO_LASTCMD=$_e; export EINFO_LASTCMD ; return \$_r; }"
done
unset _e
fi
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in
index 8dab3c2b..f78f3d32 100644
--- a/sh/gendepends.sh.in
+++ b/sh/gendepends.sh.in
@@ -58,10 +58,10 @@ do
continue
unset one two three
- export RC_SVCNAME=${RC_SERVICE##*/}
+ RC_SVCNAME=${RC_SERVICE##*/} ; export RC_SVCNAME
# Compat
- export SVCNAME=$RC_SVCNAME
+ SVCNAME=$RC_SVCNAME ; export SVCNAME
(
# Save stdout in fd3, then remap it to stderr
diff --git a/sh/ifwatchd-carrier.sh.in b/sh/ifwatchd-carrier.sh.in
index 3b1dc449..5b5d8b34 100644
--- a/sh/ifwatchd-carrier.sh.in
+++ b/sh/ifwatchd-carrier.sh.in
@@ -1,5 +1,5 @@
#!@SHELL@
# Wrapper for ifwatchd(8)
-export IN_BACKGROUND=yes
+IN_BACKGROUND=yes ; export IN_BACKGROUND
$RC_SERVICE --quiet start
diff --git a/sh/ifwatchd-nocarrier.sh.in b/sh/ifwatchd-nocarrier.sh.in
index cedc275f..bbecfe84 100644
--- a/sh/ifwatchd-nocarrier.sh.in
+++ b/sh/ifwatchd-nocarrier.sh.in
@@ -1,5 +1,5 @@
#!@SHELL@
# Wrapper for ifwatchd(8)
-export IN_BACKGROUND=yes
+IN_BACKGROUND=yes ; export IN_BACKGROUND
$RC_SERVICE --quiet stop
diff --git a/sh/rc-functions.sh.in b/sh/rc-functions.sh.in
index de430742..7fe12942 100644
--- a/sh/rc-functions.sh.in
+++ b/sh/rc-functions.sh.in
@@ -109,5 +109,5 @@ _depend() {
# Add our sbin to $PATH
case "$PATH" in
"$RC_LIBEXECDIR"/sbin|"$RC_LIBEXECDIR"/sbin:*);;
- *) export PATH="$RC_LIBEXECDIR/sbin:$PATH";;
+ *) PATH="$RC_LIBEXECDIR/sbin:$PATH" ; export PATH ;;
esac
diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
index 6ad2ded3..d53d70d6 100644
--- a/sh/runscript.sh.in
+++ b/sh/runscript.sh.in
@@ -46,11 +46,11 @@ if [ -z "$1" -o -z "$2" ]; then
fi
# So daemons know where to recall us if needed
-export RC_SERVICE="$1"
+RC_SERVICE="$1" ; export RC_SERVICE
shift
# Compat
-export SVCNAME=$RC_SVCNAME
+SVCNAME=$RC_SVCNAME ; export SVCNAME
# Dependency function
config() {
diff --git a/support/openvpn/down.sh b/support/openvpn/down.sh
index 4e749372..93dd53ca 100755
--- a/support/openvpn/down.sh
+++ b/support/openvpn/down.sh
@@ -18,7 +18,8 @@ fi
# Re-enter the init script to stop any dependant services
if [ -x "${RC_SERVICE}" ]; then
if "${RC_SERVICE}" --quiet status; then
- export IN_BACKGROUND=YES
+ IN_BACKGROUND=YES
+ export IN_BACKGROUND
"${RC_SERVICE}" --quiet stop
fi
fi
diff --git a/support/openvpn/up.sh b/support/openvpn/up.sh
index c52ea048..f207dce0 100755
--- a/support/openvpn/up.sh
+++ b/support/openvpn/up.sh
@@ -64,7 +64,8 @@ fi
# Re-enter the init script to start any dependant services
if [ -x "${RC_SERVICE}" ]; then
if ! "${RC_SERVICE}" --quiet status; then
- export IN_BACKGROUND=true
+ IN_BACKGROUND=YES
+ export IN_BACKGROUND
"${RC_SERVICE}" --quiet start
fi
fi
diff --git a/test/setup_env.sh b/test/setup_env.sh
index f992d714..f7996eea 100755
--- a/test/setup_env.sh
+++ b/test/setup_env.sh
@@ -17,8 +17,9 @@ elif ! . ${top_srcdir}/sh/functions.sh; then
exit 1
fi
-export LD_LIBRARY_PATH=${top_builddir}/src/libeinfo:${top_builddir}/src/librc:${LD_LIBRARY_PATH}
-export PATH=${top_builddir}/src/rc:${PATH}
+LD_LIBRARY_PATH=${top_builddir}/src/libeinfo:${top_builddir}/src/librc:${LD_LIBRARY_PATH}
+PATH=${top_builddir}/src/rc:${PATH}
+export LD_LIBRARY_PATH PATH
cd ${top_srcdir}/src/rc
${MAKE:-make} links >/dev/null