1 |
Signed-off-by: David Seifert <soap@g.o> |
2 |
--- |
3 |
eclass/s6.eclass | 42 ++++++++++++++++++++---------------------- |
4 |
1 file changed, 20 insertions(+), 22 deletions(-) |
5 |
|
6 |
diff --git a/eclass/s6.eclass b/eclass/s6.eclass |
7 |
index f4d7ebf2c31..56b321f178f 100644 |
8 |
--- a/eclass/s6.eclass |
9 |
+++ b/eclass/s6.eclass |
10 |
@@ -42,7 +42,7 @@ _s6_get_servicedir() { |
11 |
# @DESCRIPTION: |
12 |
# Output the path for the s6 service directory (not including ${D}). |
13 |
s6_get_servicedir() { |
14 |
- debug-print-function ${FUNCNAME} "${@}" |
15 |
+ debug-print-function ${FUNCNAME} "$@" |
16 |
|
17 |
echo "${EPREFIX}$(_s6_get_servicedir)" |
18 |
} |
19 |
@@ -55,22 +55,22 @@ s6_get_servicedir() { |
20 |
# run is the run script for the service. |
21 |
# finish is the optional finish script for the service. |
22 |
s6_install_service() { |
23 |
- debug-print-function ${FUNCNAME} "${@}" |
24 |
+ debug-print-function ${FUNCNAME} "$@" |
25 |
|
26 |
local name="$1" |
27 |
local run="$2" |
28 |
local finish="$3" |
29 |
|
30 |
- [[ $name ]] || |
31 |
+ [[ -z ${name} ]] && |
32 |
die "${ECLASS}.eclass: you must specify the s6 service name" |
33 |
- [[ $run ]] || |
34 |
+ [[ -z ${run} ]] && |
35 |
die "${ECLASS}.eclass: you must specify the s6 service run script" |
36 |
|
37 |
( |
38 |
- local servicepath="$(_s6_get_servicedir)/$name" |
39 |
- exeinto "$servicepath" |
40 |
- newexe "$run" run |
41 |
- [[ $finish ]] && newexe "$finish" finish |
42 |
+ local servicepath="$(_s6_get_servicedir)/${name}" |
43 |
+ exeinto "${servicepath}" |
44 |
+ newexe "${run}" run |
45 |
+ [[ -n ${finish} ]] && newexe "${finish}" finish |
46 |
) |
47 |
} |
48 |
|
49 |
@@ -81,18 +81,17 @@ s6_install_service() { |
50 |
# default. |
51 |
# servicename is the name of the service. |
52 |
s6_service_down() { |
53 |
- debug-print-function ${FUNCNAME} "${@}" |
54 |
+ debug-print-function ${FUNCNAME} "$@" |
55 |
|
56 |
local name="$1" |
57 |
- |
58 |
- [[ $name ]] || |
59 |
+ [[ -z ${name} ]] && |
60 |
die "${ECLASS}.eclass: you must specify the s6 service name" |
61 |
|
62 |
( |
63 |
- touch "$T"/down || die |
64 |
- local servicepath="$(_s6_get_servicedir)/$name" |
65 |
- insinto "$servicepath" |
66 |
- doins "$T"/down |
67 |
+ touch "${T}"/down || die |
68 |
+ local servicepath="$(_s6_get_servicedir)/${name}" |
69 |
+ insinto "${servicepath}" |
70 |
+ doins "${T}"/down |
71 |
) |
72 |
} |
73 |
|
74 |
@@ -103,17 +102,16 @@ s6_service_down() { |
75 |
# leader. |
76 |
# servicename is the name of the service. |
77 |
s6_service_nosetsid() { |
78 |
- debug-print-function ${FUNCNAME} "${@}" |
79 |
+ debug-print-function ${FUNCNAME} "$@" |
80 |
|
81 |
local name="$1" |
82 |
- |
83 |
- [[ $name ]] || |
84 |
+ [[ -z ${name} ]] && |
85 |
die "${ECLASS}.eclass: you must specify the s6 service name" |
86 |
|
87 |
( |
88 |
- touch "$T"/nosetsid || die |
89 |
- local servicepath="$(_s6_get_servicedir)/$name" |
90 |
- insinto "$servicepath" |
91 |
- doins "$T"/nosetsid |
92 |
+ touch "${T}"/nosetsid || die |
93 |
+ local servicepath="$(_s6_get_servicedir)/${name}" |
94 |
+ insinto "${servicepath}" |
95 |
+ doins "${T}"/nosetsid |
96 |
) |
97 |
} |
98 |
-- |
99 |
2.39.0 |