diff options
author | Roy Marples <roy@marples.name> | 2008-11-12 19:19:56 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-11-12 19:19:56 +0000 |
commit | 0cca768b82a3225f82747863e674cae68ab790e1 (patch) | |
tree | 8f41b33f346b6d7439911e61705a651a227efc27 | |
parent | df22978de96c979c81feff80a54ef8d21b5fdeab (diff) |
Mark the addon code as deprecated.
-rw-r--r-- | sh/rc-functions.sh.in | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sh/rc-functions.sh.in b/sh/rc-functions.sh.in index 751d47a3..8408814b 100644 --- a/sh/rc-functions.sh.in +++ b/sh/rc-functions.sh.in @@ -7,12 +7,22 @@ has_addon() [ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /@LIB@/rcscripts/addons/"$1".sh ] } +_addon_warn() +{ + eindent + ewarn "${RC_SVCNAME} uses addon code which is now deprecated in OpenRC" + ewarn "and is not guaranteed to be present in future versions." + eoutdent +} + import_addon() { if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then + _addon_warn . "${RC_LIBDIR}/addons/$1.sh" - elif [ -e /@LIB@/rcscripts/addons/"$1".sh ]; then - . /@LIB@/rcscripts/addons/"$1".sh + elif [ -e /lib64/rcscripts/addons/"$1".sh ]; then + _addon_warn + . /lib64/rcscripts/addons/"$1".sh else return 1 fi |