DragonFly submit List (threaded) for 2006-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: rc.d standardization patch
I just updated patch with a simplified block along the lines you said.
except:
eval ${1}=$_value
http://www.uberstyle.net/~kevin/rcenable.diff
On 7/28/06, Simon 'corecode' Schubert <corecode@xxxxxxxxxxxx> wrote:
Kevin L. Kane wrote:
> respect configs that use old names with _enable but output a warning
> saying _enable is deprecated.
[..]
> @@ -219,6 +220,26 @@
> #
> checkyesno()
> {
> + # this is added for compatibility purposes will
> + # be removed when _enable is deprecated for real
> + eval _value=\$${1}_enable
> + debug "checkyesno: $1 is set to $_value."
> + case $_value in
> +
> + # "yes", "true", "on", or "1"
> + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
> + warn "\$${1}_enable is deprecated, use: \$${1} instead."
> + return 0
> + ;;
> +
> + # "no", "false", "off", or "0"
> + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
> + warn "\$${1}_enable is deprecated, use: \$${1} instead."
> + return 1
> + ;;
> + esac
> + # end compatibility section for _enable
> +
how about making this
if [ -n "$_value" ]
then
warn "\$${1}_enable is deprecated, use: \$${1} instead."
eval \$${1}=\$${1}_enable
fi
cheers
simon
--
Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\
Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ /
Party Enjoy Relax | http://dragonflybsd.org Against HTML \
Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
--
Kevin L. Kane
kevin.kane at gmail.com
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]