OSDN Git Service

[fix] : Fixed #243
authorhayao <hayao@fascode.net>
Thu, 11 Mar 2021 10:34:12 +0000 (19:34 +0900)
committerhayao <hayao@fascode.net>
Thu, 11 Mar 2021 10:34:12 +0000 (19:34 +0900)
build.sh
tools/clean.sh

index ff8997f..dc5f7e2 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -211,7 +211,7 @@ _mount() {
 # Unmount chroot dir
 umount_chroot () {
     local _mount
-    for _mount in $(mount | getclm 3 | grep $(realpath ${work_dir}) | tac); do
+    for _mount in $(cat /proc/mounts | getclm 2 | grep $(realpath ${work_dir}) | tac); do
         if [[ ! "${_mount}" = "$(realpath ${work_dir})/${arch}/airootfs" ]]; then
             msg_info "Unmounting ${_mount}"
             _umount "${_mount}" 2> /dev/null
index 9d17351..b655005 100755 (executable)
@@ -96,7 +96,7 @@ remove() {
 # Unmount chroot dir
 umount_chroot () {
     local _mount
-    for _mount in $(mount | getclm 3 | grep $(realpath ${work_dir}) | tac); do
+    for _mount in $(cat /proc/mounts | getclm 2 | grep $(realpath ${work_dir}) | tac); do
         msg_info "Unmounting ${_mount}"
         umount -lf "${_mount}" 2> /dev/null
     done