mountpoints: OpenBSD: mount(8) -v for more options and disklabel(8) UID#92
Merged
corporate-gadfly merged 1 commit intoOpenVoxProject:mainfrom Mar 12, 2026
Merged
Conversation
Contributor
Author
|
@buzzdeee FYI |
Contributor
|
@klemensn To make tests pass, does it make sense to update the test to the following? diff --git a/spec/facter/resolvers/openbsd/mountpoints_spec.rb b/spec/facter/resolvers/openbsd/mountpoints_spec.rb
index db223425e..d22079e0a 100644
--- a/spec/facter/resolvers/openbsd/mountpoints_spec.rb
+++ b/spec/facter/resolvers/openbsd/mountpoints_spec.rb
@@ -16,7 +16,7 @@ describe Facter::Resolvers::Openbsd::Mountpoints do
before do
allow(Facter::Core::Execution).to receive(:execute)
- .with('mount', logger: an_instance_of(Facter::Log))
+ .with('mount -v', logger: an_instance_of(Facter::Log))
.and_return(load_fixture('openbsd_filesystems').read)
allow(Facter::Core::Execution).to receive(:execute)
.with('df -P', logger: an_instance_of(Facter::Log)) |
Contributor
Author
Looks reasonable, I simply don't know (yet) how these tests work, hence why I haven't been able to fix them. I can update the Pr in a few hours, but anyone from the project with permissions to do so here on GitHub is free to go ahead with that now. |
c2698ae to
c59c84d
Compare
Contributor
Author
That worked, thanks. |
Contributor
|
We usually prefer a single commit, so a rebase and squash would be wonderful @klemensn . |
"Verbose mode" yields makes some options always appear, e.g.
`rw` rather than lack of `read-only` or informational timestamps,
as well as a disk's unique identifier, iff available.
Example `mount` and `facter mountpoints` output changes due to `-v`:
```
-/dev/sd1a on / type ffs (local, noatime)
+/dev/sd1a (2b22b08ec9273d80.a) on / type ffs (rw, local, ctime=Sat Feb 21 13:52:57 2026)
```
```
{
available => "663.01 MiB",
available_bytes => 695216128,
capacity => "27.91%",
device => "/dev/sd1a",
+ duid => "2b22b08ec9273d80.a",
filesystem => "ffs",
options => [
+ "rw",
"local",
"noatime",
+ "ctime=Sun Mar 1 16:49:49 2026"
],
size => "988.19 MiB",
size_bytes => 1036187648,
used => "275.77 MiB",
used_bytes => 289163264
}
```
With DUID not available, e.g. after remounting in certain ways:
```
-/dev/sd1a on / type ffs (local, noatime)
+/dev/sd1a on / type ffs (rw, local, noatime, ctime=Sun Mar 1 16:31:04 2026)
```
```
{
available => "663.01 MiB",
available_bytes => 695216128,
capacity => "27.91%",
device => "/dev/sd1a",
filesystem => "ffs",
options => [
+ "rw",
"local",
"noatime",
+ "ctime=Sun Mar 1 16:49:49 2026"
],
size => "988.19 MiB",
size_bytes => 1036187648,
used => "275.77 MiB",
used_bytes => 289163264
}
```
This makes it easier to:
- compare and ensure options
- manage fstab(5) using stable DUIDs
(device numbers roam due to attach order, softraid(4)/vnd(4), etc.)
c59c84d to
a64f6c7
Compare
corporate-gadfly
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two easy improvements upon #84.