From 943c0feb1967e057b2ae518246859b50c58433b0 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 3 Feb 2013 18:58:55 -0500 Subject: shutdown: use umount --recursive Signed-off-by: Dave Reisner --- PKGBUILD | 2 +- shutdown | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 5311210..440e691 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,7 +8,7 @@ license=('GPL') groups=('base') conflicts=('mkinitcpio') provides=("mkinitcpio=$pkgver") -depends=('mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.21' 'libarchive' 'coreutils' +depends=('mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.23' 'libarchive' 'coreutils' 'awk' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'systemd' 'gzip') makedepends=('asciidoc' 'git' 'sed') optdepends=('xz: Use lzma or xz compression for the initramfs image' diff --git a/shutdown b/shutdown index a14e479..1f5fdc1 100644 --- a/shutdown +++ b/shutdown @@ -79,21 +79,7 @@ cd /sys/class/block printf '%s\n' "Unmounting all devices." -# unmount everything in /oldroot -findmnt -Rruno TARGET /oldroot | awk ' -BEGIN { i = 0 } -{ - i++ - mounts[i] = $0 -} -END { - for (j = i; j > 0; j--) { - print mounts[j] - } -} -' | while read -r mount; do - umount "$mount" -done +umount --recursive /oldroot printf '%s\n' 'Detaching loop devices.' -- cgit v1.2.3-24-g4f1b