summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shutdown7
1 files changed, 1 insertions, 6 deletions
diff --git a/shutdown b/shutdown
index 483f5b1..2b2bcca 100644
--- a/shutdown
+++ b/shutdown
@@ -53,12 +53,7 @@ disassemble() {
local holder=
for holder in "$1"/holders/*; do
- if [ ! -e "$holder" ]; then
- # end of the chain, recurse back up
- stop_device "$1"
- return
- fi
- disassemble "${holder##*/}"
+ [ -e "$holder" ] && disassemble "${holder##*/}"
stop_device "$1"
done
}