|
57 |
# @param description (optional) |
57 |
# @param description (optional) |
58 |
info_header() |
58 |
info_header() |
59 |
{ |
59 |
{ |
60 |
_path=$(readlink -m "$0") |
60 |
_path="$(readlink -m "$0")" |
61 |
script="${_path##*scripts/}" |
61 |
script="${_path##*scripts/}" |
62 |
echo "=== $script ($(date +'%Y-%m-%d %H:%M:%S')) ===" |
62 |
echo "=== $script ($(date +'%Y-%m-%d %H:%M:%S')) ===" |
63 |
|
63 |
|
64 |
# information for the internal progress handler |
64 |
# information for the internal progress handler |
65 |
# print the name of the script... if not specified the script name |
65 |
# print the name of the script... if not specified the script name |
66 |
name="$2" |
66 |
name="${2:-$script}" |
67 |
[ -z "$name" ] && name="$script" |
|
|
68 |
echo "__NAME__:$script $name" |
67 |
echo "__NAME__:$script $name" |
69 |
} |
68 |
} |
70 |
|
69 |
|
|
112 |
|
111 |
|
113 |
is_variable_set() |
112 |
is_variable_set() |
114 |
{ # INVERTED return code: returns '1' if found, '0' if not |
113 |
{ # INVERTED return code: returns '1' if found, '0' if not |
115 |
if [ ! -e $profile_file ]; then |
114 |
if [ ! -e "$profile_file" ]; then |
116 |
return 0 |
115 |
return 0 |
117 |
fi |
116 |
fi |
118 |
|
117 |
|
|
128 |
} |
127 |
} |
129 |
get_profile_var () |
128 |
get_profile_var () |
130 |
{ |
129 |
{ |
131 |
if [ ! -e $profile_file ]; then |
130 |
if [ ! -e "$profile_file" ]; then |
132 |
return |
131 |
return |
133 |
fi |
132 |
fi |
134 |
|
133 |
|
|
142 |
|
141 |
|
143 |
service_stop () |
142 |
service_stop () |
144 |
{ |
143 |
{ |
145 |
for service in $@; do |
144 |
for service in "$@" |
146 |
if [ -x /etc/init.d/$service ]; then |
145 |
do |
|
|
146 |
if [ -x "/etc/init.d/$service" ] |
147 |
then |
147 |
invoke-rc.d "$service" stop |
148 |
invoke-rc.d "$service" stop |
148 |
fi |
149 |
fi |
149 |
done |
150 |
done |
150 |
} |
151 |
} |
151 |
service_start () |
152 |
service_start () |
152 |
{ |
153 |
{ |
153 |
for service in $@; do |
154 |
for service in "$@" |
154 |
if [ -x /etc/init.d/$service ]; then |
155 |
do |
|
|
156 |
if [ -x "/etc/init.d/$service" ] |
157 |
then |
155 |
invoke-rc.d "$service" start |
158 |
invoke-rc.d "$service" start |
156 |
fi |
159 |
fi |
157 |
done |
160 |
done |
158 |
- |
|
|
159 |
-- |
160 |
.../base/univention-system-setup/debian/changelog | 6 ++++++ |
161 |
.../base/univention-system-setup/debian/changelog | 6 ++++++ |
161 |
.../univention-system-setup/scripts/setup_utils.sh | 22 ++++++++------------ |
162 |
.../univention-system-setup/scripts/setup_utils.sh | 22 ++++++++------------ |
162 |
2 files changed, 15 insertions(+), 13 deletions(-) |
163 |
2 files changed, 15 insertions(+), 13 deletions(-) |