iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
110af45
)
add check for occasional problem
author
Ian Kelling
<ian@iankelling.org>
Sun, 17 Sep 2023 22:04:11 +0000
(18:04 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Sun, 17 Sep 2023 22:04:11 +0000
(18:04 -0400)
mount-latest-subvol
patch
|
blob
|
history
diff --git
a/mount-latest-subvol
b/mount-latest-subvol
index cddb714df7962b2fb48521800e07b471267250ff..9fd99326b81afd4475dbcd1406dffd5cb6365abb 100644
(file)
--- a/
mount-latest-subvol
+++ b/
mount-latest-subvol
@@
-317,6
+317,7
@@
for vol in ${all_vols[@]}; do
##### end building up list of bind mounts ######
##### end building up list of bind mounts ######
+
# if latest is already mounted, make sure binds are mounted and move on
m check-subvol-stale $d
# populated by check-subvol-stale if stale
# if latest is already mounted, make sure binds are mounted and move on
m check-subvol-stale $d
# populated by check-subvol-stale if stale
@@
-335,6
+336,28
@@
for vol in ${all_vols[@]}; do
continue
fi
continue
fi
+
+ ##### begin checking for loopback mounts ####
+ found_loop=false
+ for l in $(losetup -ln|awk '{print $6}'); do
+ for dir in $d ${binds[@]}; do
+ if [[ $l == $dir* ]]; then
+ echo "$0: found loopback mount $l. giving up on unmounting $dir"
+ ret=1
+ found_loop=true
+ break
+ fi
+ done
+ if $found_loop; then
+ break
+ fi
+ done
+ if $found_loop; then
+ continue
+ fi
+ ##### end end checking loopback mounts ####
+
+
## not using arbtt at the moment
# if [[ $vol == q ]]; then
# ## allow to fail, user might not be logged in
## not using arbtt at the moment
# if [[ $vol == q ]]; then
# ## allow to fail, user might not be logged in