DragonFly BSD
DragonFly submit List (threaded) for 2006-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: rc.d standardization patch


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Fri, 28 Jul 2006 18:51:12 +0200

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   / \

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]