Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: sh/
Date: Tue, 26 Jul 2011 17:29:32
Message-Id: df1f02ac848a010092df2d3d40b8828051522b4b.WilliamH@gentoo
1 commit: df1f02ac848a010092df2d3d40b8828051522b4b
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 26 17:19:59 2011 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 26 17:19:59 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=df1f02ac
7
8 Runscript: print deprecation warning for opts variable
9
10 Openrc uses the extra_commands and extra_started_commands variables to
11 list extra commands for services. Also, it supports the opts variable
12 which is used to assist migration from baselayout-1.
13
14 I am adding this warning to encourage switching from opts to
15 extra_commands/extra_started_commands.
16
17 I would like to remove support for opts eventually.
18
19 ---
20 sh/runscript.sh.in | 6 ++++++
21 1 files changed, 6 insertions(+), 0 deletions(-)
22
23 diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in
24 index a3f387e..df34b5e 100644
25 --- a/sh/runscript.sh.in
26 +++ b/sh/runscript.sh.in
27 @@ -206,6 +206,12 @@ for _f in $required_files; do
28 done
29 unset _f
30
31 +if [ -n "$opts" ]; then
32 + ewarn "Use of the opts variable is deprecated and will be"
33 + ewarn "removed in the future."
34 + ewarn "Please use extra_commands or extra_started_commands."
35 +fi
36 +
37 while [ -n "$1" ]; do
38 # Sepcial case depend
39 if [ "$1" = depend ]; then