# parameters.
#
get_bootconfig() {
- local copt=
- local newbootlevel=
- local newsoftlevel=
+ local copt
+ local newbootlevel
+ local newsoftlevel
for copt in $(</proc/cmdline) ; do
case "${copt%=*}" in
# use the system logger to log a message
#
esyslog() {
- local pri=
- local tag=
+ local pri
+ local tag
if [ -x /usr/bin/logger ]
then
# v-e-commands honor RC_VERBOSE which defaults to no.
# The condition is negated so the return value will be zero.
-veinfo() { [ "${RC_VERBOSE}" != yes ] || einfo "$@"; }
-veinfon() { [ "${RC_VERBOSE}" != yes ] || einfon "$@"; }
-vewarn() { [ "${RC_VERBOSE}" != yes ] || ewarn "$@"; }
-veerror() { [ "${RC_VERBOSE}" != yes ] || eerror "$@"; }
-vebegin() { [ "${RC_VERBOSE}" != yes ] || ebegin "$@"; }
+veinfo() { [ "${RC_VERBOSE}" != "yes" ] || einfo "$@"; }
+veinfon() { [ "${RC_VERBOSE}" != "yes" ] || einfon "$@"; }
+vewarn() { [ "${RC_VERBOSE}" != "yes" ] || ewarn "$@"; }
+veerror() { [ "${RC_VERBOSE}" != "yes" ] || eerror "$@"; }
+vebegin() { [ "${RC_VERBOSE}" != "yes" ] || ebegin "$@"; }
veend() {
[ "${RC_VERBOSE}" = "yes" ] && { eend "$@"; return $?; }
return ${1:-0}
return ${1:-0}
}
-# char *KV_major(string)
-#
-# Return the Major (X of X.Y.Z) kernel version
-#
-KV_major() {
- [ -z "$1" ] && return 1
-
- local KV=$@
- printf "${KV%%.*}\n"
-}
-
# char *KV_minor(string)
#
# Return the Minor (Y of X.Y.Z) kernel version
# also, error checking is not that extensive ...
#
dolisting() {
- local x=
- local y=
- local tmpstr=
- local mylist=
+ local x
+ local y
+ local tmpstr
+ local mylist
local mypath="$*"
if [ "${mypath%/\*}" != "${mypath}" ]
do
[ ! -e "${x}" ] && continue
- if [ ! -d "${x}" ] && ( [ -L "${x}" -o -f "${x}" ] )
+ if [ ! -d "${x}" ] && ( [ -L "${x}" ] || [ -f "${x}" ] )
then
mylist="${mylist} $(ls "${x}" 2> /dev/null)"
else