git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authormail_redacted_for_web 2020-06-01 09:31:51 +0200
committermail_redacted_for_web 2020-06-01 09:31:51 +0200
commitbce94c9f77eebe4fc9bb0b58afe04f5c276532de (patch)
tree4600dc6d913583a0b5c3dab2b1a281c777e52e9a /bin
parentc9fabd2b3f14cbbdb3453430fa022996407aa846 (diff)
downloadrhel-scripts-bce94c9f77eebe4fc9bb0b58afe04f5c276532de.tar.bz2
condensed reboot summary, reboot summary in any case, updated sudoers
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dnfu9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/dnfu b/bin/dnfu
index 966285e..175be76 100755
--- a/bin/dnfu
+++ b/bin/dnfu
@@ -129,9 +129,6 @@ function supgrade {
;;
esac
unset UFIN USTART
- printf "Checking for outdated running services or necessity to reboot...:\n"
- sudo "${UCMD}" needs-restarting -C --color true 2>&1|tee -a "$DLOG"
- sudo "$UCMD" needs-restarting -r >/dev/null 2>&1 ||$LWCMD "Reboot required."||:
}
function snrefresh {
rbeg "Refreshing snapd snaps"
@@ -174,8 +171,12 @@ esac
if [ "$UPDAVAIL" -eq 0 ];then
supgrade
fi
+#printf "Checking for outdated running services or necessity to reboot...:\n"
+sudo "${UCMD}" needs-restarting -C 2>/dev/null|grep -P '^[0-9]+[ ]+:'|wc -l
+sudo "${UCMD}" needs-restarting -C -r --color true 2>&1|tee -a "$DLOG"
+sudo "${UCMD}" needs-restarting -r >/dev/null 2>&1 ||$LWCMD "Reboot required."||:
-if [ ! -z "$SCMD" ];then
+if [ -e "$SCMD" ];then
snrefresh
fi
$LCMD "Detailed logfile is located at $DLOG."