summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-09 15:25:57 +0100
committerDave Reisner <dreisner@archlinux.org>2012-11-11 00:47:33 +0100
commitf87734823e4815d7531c7c01cce772f07f3ef331 (patch)
treece5365f1ebee45c28ef2b4993c0a787a0767e590
parentb73a18a30b2d1fcb9b9107dab98e8d2881eca4ef (diff)
downloadmkinitcpio-f87734823e4815d7531c7c01cce772f07f3ef331.tar.gz
mkinitcpio-f87734823e4815d7531c7c01cce772f07f3ef331.tar.xz
shutdown: simplify recursive disassemble
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-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
}