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:
77f3e69
)
install-my-scripts on mounting new subvol to use more up to date scripts
author
Ian Kelling
<iank@fsf.org>
Wed, 29 May 2019 02:02:14 +0000
(22:02 -0400)
committer
Ian Kelling
<iank@fsf.org>
Wed, 29 May 2019 02:02:14 +0000
(22:02 -0400)
mount-latest-subvol
patch
|
blob
|
history
diff --git
a/mount-latest-subvol
b/mount-latest-subvol
index 9bb324b918a20cd0a9357b7d125086f8506c2dfe..cfcbd727ad226893333fae699ac6e400476735ed 100644
(file)
--- a/
mount-latest-subvol
+++ b/
mount-latest-subvol
@@
-299,6
+299,7
@@
for vol in q a o i; do
fi
done
fi
done
+ # if we unmounted some but not all, restore them and move on
if ! $umount_ret; then
for dir in ${unmounted[@]}; do
mnt $dir
if ! $umount_ret; then
for dir in ${unmounted[@]}; do
mnt $dir
@@
-306,6
+307,7
@@
for vol in q a o i; do
continue
fi
continue
fi
+ #### begin dealing with leaf vols ####
# todo: decipher /mnt/root, like we do in check-subvol-stale
cd /mnt/root
if [[ -e $vol ]]; then
# todo: decipher /mnt/root, like we do in check-subvol-stale
cd /mnt/root
if [[ -e $vol ]]; then
@@
-358,6
+360,8
@@
for vol in q a o i; do
done
## end expire leaf vols ##
fi
done
## end expire leaf vols ##
fi
+ #### end dealing with leaf vols ####
+
# Note, we make a few assumptions in this script, like
# $d was not a different subvol id than $vol, and
# things otherwise didn't get mounted very strangely.
# Note, we make a few assumptions in this script, like
# $d was not a different subvol id than $vol, and
# things otherwise didn't get mounted very strangely.
@@
-367,6
+371,11
@@
for vol in q a o i; do
done
stale_dir=/nocow/btrfs-stale
rm -f $stale_dir/$d
done
stale_dir=/nocow/btrfs-stale
rm -f $stale_dir/$d
+
+ if [[ $vol == a ]]; then
+ # useful to keep this at the latest version
+ /a/exe/install-my-scripts
+ fi
done
### disabled
done
### disabled