-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Ensure /home is indexed by plocate on Btrfs #5320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| # Update localdb so that locate will find everything installed | ||
| # Ensure /home is indexed on Btrfs (subvolumes look like bind mounts) | ||
| sudo sed -i 's/PRUNE_BIND_MOUNTS.*=.*/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf | ||
| sudo updatedb | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| echo "Allow plocate to index Btrfs subvolumes (including home)" | ||||||
|
|
||||||
| if grep -q '^PRUNE_BIND_MOUNTS.*=.*"yes"' /etc/updatedb.conf; then | ||||||
| sudo sed -i 's/^PRUNE_BIND_MOUNTS.*=.*"yes"/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf | ||||||
|
||||||
| sudo sed -i 's/^PRUNE_BIND_MOUNTS.*=.*"yes"/PRUNE_BIND_MOUNTS = "no"/' /etc/updatedb.conf | |
| sudo sed -i 's/^PRUNE_BIND_MOUNTS.*=.*"yes"/PRUNE_BIND_MOUNTS="no"/' /etc/updatedb.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
sedreplacement also writesPRUNE_BIND_MOUNTS = "no"with spaces around=, which is invalid in/etc/updatedb.conf(it’s a shell-style config sourced byupdatedb). This can causesudo updatedbto fail after install. Replace withPRUNE_BIND_MOUNTS="no"(no spaces) and consider anchoring the pattern to^PRUNE_BIND_MOUNTS=to avoid unintended edits.