diff options
| author | Roy Marples <roy@marples.name> | 2009-04-26 21:13:26 +0000 | 
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-04-26 21:13:26 +0000 | 
| commit | 2b866f264fa2ea9cda891018234414c4f4942eb8 (patch) | |
| tree | 4e0083f36d53b61ee4d3e54495e46af5a1eab3e8 /sh/rc-functions.sh.in | |
| parent | 59574780da461ea08af57a0bb322268369f89abc (diff) | |
| download | openrc-2b866f264fa2ea9cda891018234414c4f4942eb8.tar.xz | |
Stop using needless {} in vars
Diffstat (limited to 'sh/rc-functions.sh.in')
| -rw-r--r-- | sh/rc-functions.sh.in | 28 | 
1 files changed, 14 insertions, 14 deletions
| diff --git a/sh/rc-functions.sh.in b/sh/rc-functions.sh.in index c2927113..ebdb7687 100644 --- a/sh/rc-functions.sh.in +++ b/sh/rc-functions.sh.in @@ -1,25 +1,25 @@  # Copyright 2007 Gentoo Foundation -# Copyright 2007-2008 Roy Marples <roy@marples.name> +# Copyright 2007-2009 Roy Marples <roy@marples.name>  # All rights reserved. Released under the 2-clause BSD license.  has_addon()  { -	[ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /@LIB@/rcscripts/addons/"$1".sh ] +	[ -e "$RC_LIBDIR/addons/$1.sh" -o -e /@LIB@/rcscripts/addons/"$1".sh ]  }  _addon_warn()  {  	eindent -	ewarn "${RC_SVCNAME} uses addon code which is deprecated" +	ewarn "$RC_SVCNAME uses addon code which is deprecated"  	ewarn "and may not be available in the future."  	eoutdent  }  import_addon()  { -	if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then +	if [ -e "$RC_LIBDIR/addons/$1.sh" ]; then  		_addon_warn -		. "${RC_LIBDIR}/addons/$1.sh" +		. "$RC_LIBDIR/addons/$1.sh"  	elif [ -e /@LIB@/rcscripts/addons/"$1".sh ]; then  		_addon_warn  		. /@LIB@/rcscripts/addons/"$1".sh @@ -49,8 +49,8 @@ is_net_fs()  	# Fall back on fs types  	local t=$(mountinfo --fstype "$1") -	for x in ${net_fs_list}; do -		[ "${x}" = "${t}" ] && return 0 +	for x in $net_fs_list; do +		[ "$x" = "$t" ] && return 0  	done  	return 1  } @@ -64,17 +64,17 @@ is_union_fs()  get_bootparam()  {  	local match="$1" -	[ -z "${match}" -o ! -r /proc/cmdline ] && return 1 +	[ -z "$match" -o ! -r /proc/cmdline ] && return 1  	set -- $(cat /proc/cmdline)  	while [ -n "$1" ]; do -		[ "$1" = "${match}" ] && return 0 +		[ "$1" = "$match" ] && return 0  		case "$1" in  			gentoo=*)  				local params="${1##*=}"  				local IFS=, x= -				for x in ${params}; do -					[ "${x}" = "${match}" ] && return 0 +				for x in $params; do +					[ "$x" = "$match" ] && return 0  				done  				;;  		esac @@ -85,7 +85,7 @@ get_bootparam()  }  # Add our sbin to $PATH -case "${PATH}" in -	"${RC_LIBDIR}"/sbin|"${RC_LIBDIR}"/sbin:*);; -	*) export PATH="${RC_LIBDIR}/sbin:${PATH}";; +case "$PATH" in +	"$RC_LIBDIR"/sbin|"$RC_LIBDIR"/sbin:*);; +	*) export PATH="$RC_LIBDIR/sbin:$PATH";;  esac | 
