From 96231548a4bfbadaab1f3cc44189f6e127b9f4f2 Mon Sep 17 00:00:00 2001 From: olli Date: Mon, 5 Dec 2022 16:37:00 +0100 Subject: [PATCH] added return code --- gaboshlib/g_staleumount.bashfunc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gaboshlib/g_staleumount.bashfunc b/gaboshlib/g_staleumount.bashfunc index 4af8424..c392d59 100644 --- a/gaboshlib/g_staleumount.bashfunc +++ b/gaboshlib/g_staleumount.bashfunc @@ -1,12 +1,15 @@ #!/bin/bash function g_staleumount { + g_return=0 grep -v tracefs /proc/mounts | grep -v /run/ | cut -d' ' -f2 | while read g_mount do if ! timeout --signal=KILL 120 ls -d "$g_mount" >/dev/null then g_echo_error "Unmounting stale/hanging $g_mount with -lf" umount -lf "$g_mount" + return=1 fi done + return $g_return } \ No newline at end of file