diff options
Diffstat (limited to 'add-service')
-rwxr-xr-x | add-service | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/add-service b/add-service index 880bd2e..f30b81e 100755 --- a/add-service +++ b/add-service @@ -129,7 +129,12 @@ add_service() { # Actually do enable/disable foo if [ -n "$units_to_enable" ]; then # Prefer preset (for native systemd units), but fall back to enable (for sysvinit units) - /bin/systemctl --quiet preset $units_to_enable >/dev/null || /bin/systemctl --quiet enable $units_to_enable >/dev/null + /bin/systemctl --quiet preset $units_to_enable >/dev/null 2>&1 || /bin/systemctl --quiet enable $units_to_enable >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "Warning: Problems encountered when activating services." >&2 + echo " Please check and enable manually if necessary." >&2 + echo " Service units affected: $units_to_enable" >&2 + fi if [ -n "$srv" -a ! -f "${systemd_migration_dir}/$srv" ]; then touch "${systemd_migration_dir}/$srv" fi |