index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | David Runge <dvzrv@archlinux.org> | 2020-07-11 18:13:20 +0200 |
---|---|---|
committer | David Runge <dvzrv@archlinux.org> | 2020-07-11 20:58:01 +0200 |
commit | 043262b5f71e3030ad5553597b0e9696f6ff56b2 (patch) | |
tree | c77adfaca93127661d7fc2f5c0b1e95c7cfd6af4 /script/archiso_shutdown | |
parent | ab2b8f8286383599b76f9f2db450ac417bd3fc1c (diff) |
-rw-r--r-- | script/archiso_shutdown | 12 |
diff --git a/script/archiso_shutdown b/script/archiso_shutdown index 41b3945..4a0c7dc 100644 --- a/script/archiso_shutdown +++ b/script/archiso_shutdown @@ -5,15 +5,15 @@ mkdir /oldrun mount -n --move /oldroot/run /oldrun # Unmount all mounts now. -umount $(mount | awk '$3 ~/^\/oldroot/ {print $3}' | sort -r) +umount "$(mount | awk '$3 ~/^\/oldroot/ {print $3}' | sort -r)" # Remove all dm-snapshot devices. dmsetup remove_all # Remove all loopback devices. for _lup in $(grep ^/dev/loop /oldrun/archiso/used_block_devices | tac); do - if ! losetup -d ${_lup} 2> /dev/null; then - umount -d ${_lup} + if ! losetup -d -- "${_lup}" 2> /dev/null; then + umount -d -- "${_lup}" fi done @@ -21,8 +21,8 @@ done umount /oldrun/archiso/cowspace # Unmount boot device if needed (no copytoram=y used) -if [[ ! -d /oldrun/archiso/copytoram ]]; then - if [[ -d /oldrun/archiso/img_dev ]]; then +if [ ! -d /oldrun/archiso/copytoram ]; then + if [ -d /oldrun/archiso/img_dev ]; then umount /oldrun/archiso/img_dev else umount /oldrun/archiso/bootmnt @@ -35,3 +35,5 @@ case "$1" in reboot|poweroff|halt) "$1" -f ;; *) halt -f;; esac + +# vim: set ft=sh: |