File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -266,8 +266,10 @@ db_stop # in case invoke failes
266
266
267
267
# If we upgrade from MySQL mysql.service may be masked, which also
268
268
# means init.d script is disabled. Unmask mysql service explicitely.
269
- # Ignore exit code as command is not available everywhere.
270
- deb-systemd-helper unmask mysql.service > /dev/null || true
269
+ # Check first that the command exists, to avoid emitting any warning messages.
270
+ if [ -x " $( command -v deb-systemd-helper) " ]; then
271
+ deb-systemd-helper unmask mysql.service > /dev/null
272
+ fi
271
273
272
274
# DEBHELPER#
273
275
Original file line number Diff line number Diff line change @@ -282,8 +282,10 @@ db_stop # in case invoke failes
282
282
283
283
# If we upgrade from MySQL mysql.service may be masked, which also
284
284
# means init.d script is disabled. Unmask mysql service explicitely.
285
- # Ignore exit code as command is not available everywhere.
286
- deb-systemd-helper unmask mysql.service > /dev/null || true
285
+ # Check first that the command exists, to avoid emitting any warning messages.
286
+ if [ -x " $( command -v deb-systemd-helper) " ]; then
287
+ deb-systemd-helper unmask mysql.service > /dev/null
288
+ fi
287
289
288
290
# DEBHELPER#
289
291
You can’t perform that action at this time.
0 commit comments