No need for basename.
This commit is contained in:
		| @@ -36,8 +36,8 @@ getmedia() { | |||||||
| } | } | ||||||
|  |  | ||||||
| # Try and create an init script for network interfaces | # Try and create an init script for network interfaces | ||||||
| if [ ! -e /etc/init.d/"$1" ]; then | if [ ! -e /etc/init.d/"$1" -a ! -e /usr/local/init.d/"$1" ]; then | ||||||
| 	base=$(basename ${1%%.*}) | 	base=${1%%.*} | ||||||
| 	if [ "${base}" = "net" ]; then | 	if [ "${base}" = "net" ]; then | ||||||
| 		# We only create links for pyhsical interfaces | 		# We only create links for pyhsical interfaces | ||||||
| 		[ -n "$(getmedia ${1#*.})" ] || exit 1 | 		[ -n "$(getmedia ${1#*.})" ] || exit 1 | ||||||
|   | |||||||
| @@ -34,7 +34,7 @@ start() { | |||||||
| 	local svc= enabled= retval=0 service= | 	local svc= enabled= retval=0 service= | ||||||
| 	for svc in $(rcorder /etc/rc.d/* /usr/local/etc/rc.d/* 2>/dev/null); do | 	for svc in $(rcorder /etc/rc.d/* /usr/local/etc/rc.d/* 2>/dev/null); do | ||||||
| 		[ -x "$svc" ] || continue | 		[ -x "$svc" ] || continue | ||||||
| 		service=$(basename ${svc}) | 		service=${svc##*/} | ||||||
|  |  | ||||||
| 		# Skip these services | 		# Skip these services | ||||||
| 		for s in cleartmp moused; do | 		for s in cleartmp moused; do | ||||||
| @@ -46,7 +46,7 @@ start() { | |||||||
| 		[ -x /usr/local/etc/init.d/"${service}" ] && continue | 		[ -x /usr/local/etc/init.d/"${service}" ] && continue | ||||||
|  |  | ||||||
| 		# Ensure that the users rc.conf will start us - ignore the defaults | 		# Ensure that the users rc.conf will start us - ignore the defaults | ||||||
| 		eval enabled=\$$(basename "${svc}")_enable | 		eval enabled=\$${svc##*/}_enable | ||||||
| 		yesno ${enabled} || continue | 		yesno ${enabled} || continue | ||||||
|  |  | ||||||
| 		# Good to go! | 		# Good to go! | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user