Mark the addon code as deprecated.
This commit is contained in:
parent
df22978de9
commit
0cca768b82
@ -7,12 +7,22 @@ has_addon()
|
|||||||
[ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /@LIB@/rcscripts/addons/"$1".sh ]
|
[ -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()
|
import_addon()
|
||||||
{
|
{
|
||||||
if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then
|
if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then
|
||||||
|
_addon_warn
|
||||||
. "${RC_LIBDIR}/addons/$1.sh"
|
. "${RC_LIBDIR}/addons/$1.sh"
|
||||||
elif [ -e /@LIB@/rcscripts/addons/"$1".sh ]; then
|
elif [ -e /lib64/rcscripts/addons/"$1".sh ]; then
|
||||||
. /@LIB@/rcscripts/addons/"$1".sh
|
_addon_warn
|
||||||
|
. /lib64/rcscripts/addons/"$1".sh
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user