diff options
-rwxr-xr-x | portage-update.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/portage-update.sh b/portage-update.sh index 0a1c807..02e31de 100755 --- a/portage-update.sh +++ b/portage-update.sh @@ -54,8 +54,10 @@ revdep-rebuild -- -av || exit 1 DELETED=$(lsof -n | grep "DEL\|deleted") for service in ${SAFE_SERVICES[@]}; do echo "$DELETED" | grep -Eq "^$service\s+[0-9]" - echo "/etc/init.d/$service restart" - /etc/init.d/"$service" restart || exit 1 + if [ "$?" -eq 0 ]; then + echo "/etc/init.d/$service restart" + /etc/init.d/"$service" restart || exit 1 + fi done # Print any remaining processes that have open but deleted files |